|
|
|
|
|
by PaulHoule
1041 days ago
|
|
The best thing about a debugger is that it works without any modification to the code. Prints and other debugging hacks sometimes get checked into version control and even if you are careful to avoid that the cognitive load slows you down. That said there are certain things that confound debuggers or require technical tricks (like the method for debugging Java/C apps with both jdb and gdb which requires turning off the segfault trap). If the key to solving the problem involves understanding the sequence of events, or where the problem turns up when the breakpoint has been hit for the 74532th time prints win too. Do you use a language with a logging facility? Learn how to use it and improve your skills. In Java I use the debugger and unit tests a bit like I use the REPL in Python, that is I can code up an experiment in a unit test and rapidly cycle and experiment, and the great thing is I have a unit test that I can check in when I am done. |
|