PDA

View Full Version : Delphi breakpoint bug?



NecroDOME
14-08-2007, 09:26 PM
Hi there,

Since a while I got sometimes strange thing in Delphi while debuggin...

Breakpoints that are not valid according Delphi. The blue points are missing almost everywhere and appear on the blank lines somehow... However I can't debug like this, but It works...

Here is a screenie:
http://necrodome.homeftp.net/zooi/BreakBug.jpg

It's funny the first time, but it starts to annoy me now...

Robert Kosek
14-08-2007, 09:40 PM
I believe it is an indicator of recompiled lines. I have always thought it such, but I've never been absolutely sure.

NecroDOME
15-08-2007, 12:21 AM
Well, it's fixed when I restart delphi...

The blue dots indicate points I can set breakpoints... not recompiled lines.

Robert Kosek
15-08-2007, 12:25 AM
You can place breakpoints anywhere, including where the blue dots aren't. Just remember that blank lines or ones without conditionals that evaluate don't provide any insight. :)

LP
15-08-2007, 02:17 AM
These breakpoints appear that way because either that piece of code never executes or it cannot stop there because of optimizations enabled.

Make sure to rebuild your project so that new breakpoints are marked correctly (no need to restart Delphi ;)).

wodzu
16-08-2007, 07:58 AM
I had the same problem and almost went crazy because of that ;-)

Until (like lifepower said) I discovered that rebuilding project solves the problem :)

NecroDOME
16-08-2007, 09:25 AM
thnx, will rebuild next time :)

masonwheeler
16-08-2007, 05:24 PM
Also, turn off optimizations in Project -> Options -> Compiler for any debug build. It does stuff that's meant to help your program run more efficiently, but it can screw up a lot of debugging efforts by eliminating certain variables whose value you might want to see. I've also had them screw up breakpoints once or twice, though I'm not quite sure why.

(Just remember to turn Optimizations back on again for any real version.)

Mason

wodzu
16-08-2007, 08:34 PM
I've also had them screw up breakpoints once or twice, though I'm not quite sure why.


When I was working on Delphi 6 I've noticed a bug; my program was running differently with breakpoints and without. Quite strange
:P

JernejL
17-08-2007, 03:07 PM
Are you kidding me? delphi has a debugger - you call that a debugger? since delphi 4, the debugger went downhill, in delphi 7 it is as much useable as lazarus's for example...

wodzu
17-08-2007, 05:56 PM
Are you kidding me? delphi has a debugger - you call that a debugger? since delphi 4, the debugger went downhill, in delphi 7 it is as much useable as lazarus's for example...


It is getting better in BDS2006/Delphi2007, though :)