Debugging with the printf debugger

Jascha Wetzel "[firstname]" at mainia.de
Sun Feb 18 04:12:21 PST 2007


besides the fact that there might be a way to do this, it seems to me,
it's just a cumbersome substitute for simple stepping - a debugger's
job. mere stepping through D code isn't a problem with existing debuggers.


Frank Benoit (keinfarbton) wrote:
> Debugging in D is a lot of fun :)
> 
> I am searching for an idea, how to insert and remove trace statements
> quickly.
> 
> Is there a trick i can do something like this:
> 
> TRC;
> TRC; void func(){
> TRC;   callThis();
> TRC;   foreach( ....)...
> TRC; }
> TRC;
> 
> Add a very short 'something' at the start of each line. This something
> shall do nothing, if not within any function/method, but if in
> executable code, it shall print the line number.
> 
> Certainly it should not change control flow.
> 
> TRC;
> TRC; if( condition())
> TRC;   doAction();
> TRC;
> 
> Is something like this possible?



More information about the Digitalmars-d mailing list