Print is your best debugging tool(hamatti.org) |
Print is your best debugging tool(hamatti.org) |
When do people use print statements vs. gdb? I use print statements out of inertia but wonder if I should gdb more.
One point when I switch from print to debugger is when I need to run the thing over and over again switching print statements on the way – at that point it makes sense to bring in a debugger tool, halt the execution and explore what's wrong.