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.
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).
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.
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.
[+] [-] mutednarayan|11 years ago|reply
[+] [-] falcolas|11 years ago|reply
[+] [-] ufo|11 years ago|reply
[+] [-] 3JPLW|11 years ago|reply
[+] [-] fernandezpablo|11 years ago|reply
[+] [-] JonnieCache|11 years ago|reply
(Also, the really cool people turn down their knighthoods.)
[+] [-] prohor|11 years ago|reply
[+] [-] 98Windows|11 years ago|reply
Can it do multi-dimensional arrays?
[+] [-] unknown|11 years ago|reply
[deleted]
[+] [-] alexdowad|11 years ago|reply
[+] [-] Lamza|11 years ago|reply
[+] [-] q3k|11 years ago|reply
[+] [-] falcolas|11 years ago|reply