> As I had virtually no understanding of the TCP code, I liberally sprinkled it with printf()s
And people say it's a stupid way to debug!
And people say it's a stupid way to debug!
Maybe they're just a noisy minority.
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.
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.