3 ms·
Using printf to debug when you could use a good debugger is...well, I wouldn't say stupid, just highly unproductive. The problem is there are a lot of problems
by SoftwareMaven 16y ago
Using printf to debug when you could use a good debugger is...well, I wouldn't say stupid, just highly unproductive.
The problem is there are a lot of problems that aren't debugger friendly, especially if you are new to a particular domain. The kernel, timing-related problems, remote systems, production systems (you have intelligent logging, right?), etc., all have extremely valid reasons for using printf debugging.
- kahawe 16y agoOne thing I am missing or haven't found in some of the debuggers I have used (mostly Java) is the feature to just print out the code execution and return values for a certain part of or the whole code. Those prints or printfs are great to get a quick overview of what's going on, if you ask me... instead of stepping through the whole thing.