Recent

Author Topic: [SOLVED] IDE stops on line where is no breakpoint placed.  (Read 5429 times)

Wodzu

  • Full Member
  • ***
  • Posts: 171
[SOLVED] IDE stops on line where is no breakpoint placed.
« on: October 04, 2011, 07:09:31 pm »
Hi guys.

I have a problem that when I run my project, IDE stops everytime on the same line of my code.
There is no and never was a breakpoint there. There is no breakpoint marker. Ide shows a green arrow without red dot.

I can run my program further without any problems.

How to fix this?

Thanks.

« Last Edit: October 04, 2011, 11:29:21 pm by Wodzu »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11795
  • Debugger - SynEdit - and more
    • wiki
Re: IDE stops on line where is no breakpoint placed.
« Reply #1 on: October 04, 2011, 08:43:13 pm »
Open the break point window (Menu > View > Debug windows > Breakpoints). And check other breakpoints.

The problem occurs, if another breakpoint is on a line with no code.

e.g in an empty line before the procedure, in a comment, in a type declaration, .... In this case the debugger stops on the first line of code, after the line with the breakpoint.

That can be useful, if a breakpoint was set on an empty line, in the middle of a procedure.

Unfortunately there is no limit how far the breakpoint can be away.

It is a known problem, and needs to be limited, and/or additional feedback needs to be displayed if it happens.

----
Another case (which is fixed in 0.9.31) is, if a breakpoint, is after the last line of code in a unit (empty lines at end of unit).
Then the debugger stops at the first line, of whatever unit just happens to be next in the debuggers internal lists of units.

As I said, this cross unit behaviour is fixed in 0.9.31. However the fix was NOT ported to the 0.9.30.1 fixes branch. It will not be in the 0.9.30.2 release either.

----
If your breakpoint list is empty, and the problem still occurs, then please provide the content of the "Debug output" window as described here: http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Create_a_new_Report

Wodzu

  • Full Member
  • ***
  • Posts: 171
Re: IDE stops on line where is no breakpoint placed.
« Reply #2 on: October 04, 2011, 11:28:06 pm »
Thanks Martin for detailed explanation.

Deleting breakpoints helped!  :)



 

TinyPortal © 2005-2018