4 ms·
I'm adverse to debuggers as i've more than once caught myself following a rabbit hole of steping through code instead of thinking. IDEs have some use, and stat
by bluGill 4y ago
I'm adverse to debuggers as i've more than once caught myself following a rabbit hole of steping through code instead of thinking.
IDEs have some use, and static analysis has proven to catch the same mistake over and over, but only as the authors of those tools have discovered that false positives cannot be allowed ever, once there is a false positive the tools is worthless.
- icedchai 4y agoI find debuggers more valuable with dynamically typed languages, especially Python. It's handy to be able to drop a `breakpoint()` in the middle of a script when you have no idea what a function is actually returning. The happens more often than you might think.
- bornfreddy 4y agoOf course, when this happens the bug you are hunting is not your only problem. You really should clean up the code to make it clear what is being returned from the function.
- astrobe_ 4y ago> I'm adverse to debuggers as i've more than once caught myself following a rabbit hole of steping through code instead of thinking. Yes. I was kind of forced to think and do printf debugging at the beginning of my career, after having used before that (as a hobbyist) quite good asm debuggers. Maybe that's just me, but I also was, I believe, a bit over-reliant on the debugger - I would just compile, run, see what happen, and launch the debugger if something didn't work. Nowadays I could use sometimes a debugger - but the system I work with is sort of soft real-time so stopping at a breakpoint of even slight changes in timings can change the context - in some cases even printf debugging could make a bug vanish. If nothing else, debugging without a debugger is a good exercise in logically thinking - and it can save time too.
- Gibbon1 4y agoI have a code base that is a mix of hard, soft, and static real time. I have a command line interface built in to it and a lot debug logging that can be re-enabled. I've also spent some effort into making it tolerate being interrupted. And there is also the good old technique of inserting break points while the code is running.
- titzer 4y agoYes yes, indeed. The ability to look at what's happening step by step really hamstrings my imagination. Sorry, no. A debugger is a microscope! It will help you find problems faster and will seed your imagination by filling in what is really going on. It's an augmentation, like any tool. Or do you prefer to stare into space blindfolded?
- morelisp 4y ago> A debugger is a microscope! ... Or do you prefer to stare into space blindfolded? Perhaps illustrating the original point, microscopes aren't used to stare into space. A debugger is a microscope but the most pernicious bugs don't benefit from such a thing.