4 ms·
100% this. Have looked at, say, the Python debugger as used by PyCharm and thought "well this seems like a bludgeon, I only need to see how <variable> isn't wo
by scarygliders 5y ago
100% this.
Have looked at, say, the Python debugger as used by PyCharm and thought "well this seems like a bludgeon, I only need to see how <variable> isn't working as expected" and bung in various print() statements in and around the Thing concerned, sprinkling them wider and wider if the bug isn't localised to a function or even the class it's in - I may have supplied naff information to a class when instantiating it, for example.
Debuggers are simply too much of a complicated bludgeon. I can understand a need for debuggers for machine code/assembly programming, or deep system programming when you're hitting the metal, or even low level languages like C.
I've yet to find a need for a debugger for high level languages like Python. Perhaps some day. Until then, I'll plough the time which would be required to Get To Know the debugger, into writing code.
- gnud 5y agoI really don't understand this. Whenever I try to print debug, I end up missing the mark on my first print statement(s). If I just set a breakpoint, I can jump back in the stack, or step forwards, so I can easily find the real place the error happens. Of course I sometimes still print debug - when using languages with bad debuggers, languages where I don't know the tooling, languages with horrible control flow (javascript callbacks), or constrained environments, printing/logging is sometimes the best you can do. But that doesn't mean it's the best there is.
- bsder 5y agoIt's kind of funny, but Python is the only language I regular use the debugger--presumably because it's built-in. I put "if (condition): import pdb; pdb.set_trace()" all the time and almost never use "print". So, clearly I don't love "print", I just hate debuggers that are annoying to set up. I suspect that if other languages had such a convenient "drop me into the debugger" statement, more people would use debuggers.
- db48x 5y agoThe “debugger” keyword in Javascript is similar. I’ve used it frequently!