Lost a new commercial user this week :(

Daniel Davidson via Digitalmars-d digitalmars-d at puremagic.com
Thu Jan 1 07:09:53 PST 2015


On Monday, 29 December 2014 at 05:43:13 UTC, Walter Bright wrote:
>
> Often I'll pipe the pretty-printed debug output to a file, as 
> it can be voluminous, and then actually edit the file to bring 
> out what I need.
>
> Not possible with a debugger.
>

I think it is. Here is a small adjustment to consider for your 
workflow. Continue instrumenting your code with capability to 
print things as you like - data structures, etc. Then when you 
need to debug something, rather than (throw in print, compile, 
run, diagnose repeat) drop into gdb judiciously and "call 
print....", examine the output. Need more data do it again with 
the same executable. The savings is no need to repeatedly 
build/litter code with prints and you would use the debugger and 
your current style.

I seriously doubt you would change your style as you appear quite 
fond of it - clearly it works for you. The point though is others 
do find value in the debugger and this is one reason. Also, there 
are pretty printers of data structures for gdb and if you don't 
like them you could write your own.

> (dmd can have pretty complex relationships between data 
> structures and the path through the code. I might want to look 
> at these fields of a type, but not those fields. Etc. I.e. I 
> routinely build custom debugging aids for particular problems.)



More information about the Digitalmars-d mailing list