3 ms·
>>Debuggers help you check your assumptions. They're a very useful tool for this - more so than many people who say "I prefer printf" realise. A long time ago,
by berntb 16y ago
>>Debuggers help you check your assumptions. They're a very useful tool for this - more so than many people who say "I prefer printf" realise.
A long time ago, I used debuggers and printf.
For years, I've instead added tests to checks my assumptions -- and I run the tests multiple times an hour.
(I still printf since it works well with the tests if I run a subset of them.)
(Edit: This was for when I write code, not working with others.)
- vilya 16y agoIf you're saying tests are an alternative to using a debugger, then I disagree. Tests are very useful, but they fulfill a different need to debuggers. In fact the two work well together: stepping through a failing test case with a debugger can be a very effective way to find the root cause of a problem.