4 ms·
Great question. It sounds like it should have an obvious answer (what kind of crazy person wouldn't use a debugger?!), but now that I think about it, there's ma
by zarzavat 5y ago
Great question. It sounds like it should have an obvious answer (what kind of crazy person wouldn't use a debugger?!), but now that I think about it, there's many situations where I still use print debugging:
- In C++, setting up a (visual) debugger is often non-trivial, and the quality of debugging is naturally lower than in higher-level languages. So I tend to get along with print. Some bugs absolutely require the debugger though.
- With WASM I tried to get the Chrome debugger to function but gave up. Not sure it works yet.
- In Python, usually I am executing small scripts via the command line, outside an IDE, so I just resort to print statements.
To be clear none of these are my primary programming language. If I was spending significant amounts of time in front of a language I would give JetBrains however much money they asked for to get a real IDE and debugger.
Generally I don't find command-based debuggers to be that compelling, it feels like writing text with `ed`. When I do take the time to set up a visual debugger it is a significant productivity multiplier.