3 ms·
Ad-hoc debug output does scale to large projects. I have not used an interactive debugger in about ten years. My style is to only log when I'm debugging a fail
by lobster_johnson 14y ago
Ad-hoc debug output does scale to large projects. I have not used an interactive debugger in about ten years.
My style is to only log when I'm debugging a failure I don't understand. Then I remove the log output.
I also make sure that my unit tests cover the problem case I was debugging, because problems that require this kind of detailed debugging tend to be the trickiest to keep maintained without regressions. And I try to make my code based on careful state management (or, if possible, statelessness), preferably with a state machine.