|
|
|
|
|
by nradov
1038 days ago
|
|
You are doing something wrong. There are huge productivity benefits in learning how to use a debugger effectively. Debuggers have benefits that go beyond just fixing known defects. I have disciplined myself to step through every line of code that I write while watching the control flow and state changes. This allows me to proactively find and resolve defects and inefficiencies that would have otherwise leaked through testing. Issues that you would never notice while reading source code or looking at print statement output become much more obvious in a good debugger. |
|
You say there are benefits to using a debugger, but I've never had any issues not using a debugger. I've been coding for 26 years. The worst thing that's ever happened to me is that I once commented out a couple lines of code, forgot to uncomment them and pushed it to production. This affected maybe 0.001% of our users. Of course, I've learned to be more careful since then. Regardless, I've asked myself many times over the years every single time I make a mistake if it could have been prevented using a debugger and the answer is always no.
You say that you use a debugger to step through every line of code to examine the state and state changes, but I always do this in my head and have never had any issues. My colleagues always use a debugger and they constantly make mistakes. I often feel that the reason they make so many mistakes is because they rely so heavily on the debugger that it has a negative impact on their ability to analyze code in their head.
This is also why I always teach my son to do math in his head and never on paper. Relying too much on calculators and paper is in my opinion the reason why so many students perform poorly in math. But this is of course another topic.