HackerTrans
TopNewTrendsCommentsPastAskShowJobs

throwfdaew

no profile record

comments

throwfdaew
·4 anni fa·discuss
I've found and fixed so many bugs that are simple to deal with using a debugger but would require hours of peppering the code with print statements to even get close to a solution. Some simple examples are deadlock bugs in multithreaded programs (easy to halt the program and see what thread is blocked on what) or uncaught exceptions from somewhere unexpected (set the debugger to break on throw).

With a debugger you can also change the behavior of a live program, e.g. modify variables or jump over a piece of code that would otherwise be executed.

Every person I've encountered professionally who either "doesn't use debuggers" or thinks "print statements are better" seems to be under the mistaken impression that all a debugger is good for is stepping through code.

Debuggers are fantastic tools. You should re-evaluate your view of debuggers and you will become a better programmer.