Hacker News new | ask | show | jobs
by est31 2417 days ago
It seems to me that there are two schools of thought: one school which uses debuggers, the other school which uses printf statements and equivalents. Neither schools are absolutely false.
2 comments

I was once told a quote (original unknown, so any butchering is mine) something " when I was a young programmer, I relied on print statements to debug. When I learned more, I used a debugger, and when I learned even more, I used print statements"

I always took that to mean dogma was no substitute for results, so I use whichever works better for the problem at hand. (Or at least try to - often this means trying to notice when one way isn't working well and being willing to switch, but that means I was doing the worse choice for a while)

A third school that does both, based on the circumstances.
Exactly! I’ve dealt with multiple real-time embedded platforms that have a log output channel that is waaay more convenient to use via printfs than hooking up a whole debug apparatus.