3 ms·
I have never really understood the fascination with debuggers. A good log file will allow you to triage any error, even if it's not the one you were looking fo
by smcq 17y ago
I have never really understood the fascination with debuggers. A good log file will allow you to triage any error, even if it's not the one you were looking for. It seems to me that debuggers are mostly for spotting failed assumptions and won't find unreproducable or subtle systemic problems.
I consider the desire to use a debugger a bug in my logging and take corrective action.
Also, you can't grep an execution history in a debugger. I really have no idea how you would spot systemic errors without doing so.
Can anyone who lives by debuggers make a case to convince me to fire up the debugger more often?
- known 17y agoDebuggers help you in understanding the code.
- smcq 17y agoI strongly believe code that can't be understood by inspection is code that shouldn't be.
- Pistos2 17y agoI don't use debuggers often, but am glad they are available when I actually do. If a running program is like a lab rat running through a maze in the dark, then using print statements is like placing bells on tripwires in select places in the maze. Using a debugger is like turning on the lights, and watching the rat.
- smcq 17y agoI think this metaphor is somewhat wrong. Log files are like attaching medical imagers to the maze and keeping a trace of it's physical and mental state as it executes the maze. Debuggers are like attaching medical imagers to the rat and being able to only see the immediate state only. Obviously, debuggers are much faster to bootstrap than good logging, and in that category I can see them being a clear win. However, I still see them as providing less information. PS: That said, there are a few situations I bust out a debugger too. Mostly when I'm too lost to get started.