[DUG] Problems with the debugging (2010)

Jan Bakuwel jan.bakuwel at omiha.com
Fri Sep 17 11:46:46 NZST 2010


Hi Jolyon,

Thanks for the tips. I've "clicked around" in the settings, disabling
then re-enabling the debug option (did that yesterday as well) not
making any changes. Cleaned up dcu's (did that yesterday too), checked
the sources (all ok).

The debugger decided to get back to work. No idea why though (I assume a
bug in the IDE or me loosing my mind most likely the latter but not
ruling out the former :-) ).

cheers
Jan

On 17/09/10 08:58, Jolyon Smith wrote:
> Two things:
>
> 1. This sounds like your IDE is perhaps getting confused as to which units
> it is debugging... checking to make sure you have only one source file for
> the unit you *think* you are debugging, and be sure to delete others,
> including any DCU's (or make absolutely sure that no other PAS or DCU files
> for that unit could possibly exist on the path.
>
>
> 2. Maybe a dumb suggestion, but also make sure you have the "Debug" option
> enabled in your project compiler options (it may be it got turned off in
> this one project at some point for some reason).  You never know....
>
>
> 3. If all else fails, rather than adding trace/debug code, adding the
> following to your code will trigger a breakpoint in the IDE:
>
>    asm int 3 end;
>
> Interrupt #3 triggers a debugger breakpoint.
>
> As well as in this situation, it can be useful when you want a breakpoint to
> trigger only when certain conditions are true:
>
>   If <blah blah blah> then asm int 3 end;
>
> Yes, you can use conditional breakpoints but I find that the evaluation of
> conditions on IDE defined conditional breakpoints adds significant runtime
> overhead for non-trivial conditions, especially in code that executes
> frequently, e.g. in tight/long loops.
>
>
>
>
> -----Original Message-----
> From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On
> Behalf Of Jan Bakuwel
> Sent: Thursday, 16 September 2010 17:28
> To: 'NZ Borland Developers Group - Delphi List'
> Subject: [DUG] Problems with the debugging (2010)
>
> Hi all,
>
> I'm unable to convince the debugger to do what it is designed to do for
> one of my projects. It refuses to break on a breakpoint set in the code
> showing instead a white cross on a red background and a green line. The
> code surely hasn't been removed by the optimizer (as it does execute at
> runtime). Anywhere I try to set a breakpoint it refuses...
>
> This works just fine in other projects, just not this particular one. It
> has worked fine in the past, but "suddenly" stopped one day?
>
> As far as I know I've checked all the possible settings, selected the
> "Debug build" etc.
>
> This is driving me crazy - I'm now inserting debug statements in the
> code as a very poor man's alternative!
>
> Any ideas?
>
> Jan
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
> unsubscribe
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
>
>   



More information about the Delphi mailing list