[Lazarus] invisible break points??

Martin lazarus at mfriebe.de
Fri Jan 7 12:52:49 CET 2011


On 07/01/2011 06:54, Graeme Geldenhuys wrote:
> Op 2011-01-06 22:51, David Emerson het geskryf:
>> Has anyone else seen anything like this?
> Yes I have. I have noticed something like that too... when my apps run via
> the IDE (which I hardly ever do anymore) they break for no reason.
>
> I have looked into it (at the time), and it seems that if you set a
> breakpoint in the IDE and save the project. Then modify your code so the
> line at which the breakpoint was, is not source code any more (eg: a blank
> line or a comment), the app still breaks at a point close to the original
> breakpoint, but the IDE doesn't show it as a breakpoint (no red dot, and
> not breakpoint listing in the breakpoints window).

True, the IDE remembers LineNumber and FileName, and sets the Breakpoint 
at this point (and shows it at this line). You can set a breakpoint 
anywhere (if the app has not yet been started)
GDB applies this breakpoint to the next line of code, so it will stop there.

You can use the breakpoint-list window, to find them.

The problem with testing the validly of such a breakpoint are:
- You can not check the loaded source. It may differ from the compiled 
source (It may have been changed after compilation(
- The line info from the debug info can be used (blue dots), but:
   - it takes a long time to load => if you have a lot of breakpoint, 
start up of the project in the debugger would be real slowed down
   - It may not even be available, if the breakpoint is in a library, it 
only becomes avail, if the library is loaded (gdb (in recent version) 
will set the breakpoint then)

Only thing, I can think of is that once the breakpoint is hit, and the 
file is loaded, it could be checked (since then the info should be 
avail), and then it could pop up an info dialog...

---------
The original reporter said the app just seems to hang. If a breakpoint 
was hit, you would see the execution mark (green arrow), and you could 
hit F9 to continue.
So  I am not sure if the original poster encountered this same issue

-----
An other issue is that if you open 2 independent copies of the same file 
(via different sym links) you may be able to irritate the IDE, and the 
breakpoint may be in the one copy, the execution mark in the other...






More information about the Lazarus mailing list