Re: Delphi debugger ignores line

Posted by Phil p16812 on January 04, 2009

In Reply to Re: Delphi debugger ignores line posted by Jenny, DelphiLand Team on January 03, 2009

: : There is a line in my Delphi source code where the debugger doesn't stop, if I set a breakpoint on this line (click in the margin so that a red dot appears). I tried to move this line and rebuild the project, but it stays the same.
: : Are there some procedures, functions or keywords where the debugger does not "break"?
: In most cases, this is because Delphi's code optimization is turned "on".
: Other causes can be that a DCU-file with the same name is found (and that one is processed instead of your unit), or that Delphi can't overwrite the older DCU file.
: I would suggest firstly to turn the optimization "off" (Project / Options / Compiler / Code generation / Optimization).

Now the debugging break works, thanks a lot!
But I don't understand it: I thought that "optimization" makes things better??? Can someone please clarify this?

Related articles


Follow Ups