top | item 9289122

Debugging like a sir

39 points| esneider | 11 years ago |github.com | reply

discuss

order
[+] mutednarayan|11 years ago|reply
If you really want to do any sort of heavy debugging in C you should really do yourself a favor and learn to use gdb. You'll be able to debug your code while still keeping the source intact and also get more tools.
[+] falcolas|11 years ago|reply
This in no way prevents you from using GDB, and could indeed complement it. You can't always depend on having GDB available (i.e. production hosts where the sysadmins have (rightfully) restricted the use of compilation and debugging tools).
[+] ufo|11 years ago|reply
Or `ddd` if you prefer something with a GUI (it makes watching variables and memory locations muich easier, IMO)
[+] 3JPLW|11 years ago|reply
Interesting project, poor tagline.
[+] JonnieCache|11 years ago|reply
People with the title sir are called knights, or sometimes Knights of the Realm.

(Also, the really cool people turn down their knighthoods.)

[+] prohor|11 years ago|reply
OK, this is logging on debug level, but when level is decided during compilation. Why don't using logging on debug then? You can also diagnose production code, while log level check is not very expensive.
[+] 98Windows|11 years ago|reply
This is great, I've always loathed writing lots of messy printf statements to debug my code.

Can it do multi-dimensional arrays?

[+] Lamza|11 years ago|reply
i love this meme xD
[+] q3k|11 years ago|reply
So this is just glorified tombstone debugging..? Why not use a proper debugger, like gdb?
[+] falcolas|11 years ago|reply
Personally, because not all issues occur on a machine I can set up and run GDB in. Having this kind of data in logs is incredibly useful for those kinds of situations.