[DUG] Problems with the debugging (2010)

David Brennan dugdavid at dbsolutions.co.nz
Fri Sep 17 09:29:25 NZST 2010


Thanks Jolyon, that one (using asm int 3 end) gets filed into my 'useful'
sub-folder of the DUG folder... ;-)



-----Original Message-----
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On
Behalf Of Jolyon Smith
Sent: Friday, 17 September 2010 8:58 a.m.
To: 'NZ Borland Developers Group - Delphi List'
Subject: Re: [DUG] Problems with the debugging (2010)

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