February 16, 2007 Debugging with the printf debugger | ||||
|---|---|---|---|---|
| ||||
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?
| ||||
February 18, 2007 Re: Debugging with the printf debugger | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Frank Benoit (keinfarbton) | 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?
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply