4 ms·
I 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
by Pistos2 17y ago
I 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.