DEV Community

Discussion on: How do YOU debug

Collapse
 
waylonwalker profile image
Waylon Walker

I am with the others so far, print statements cover 95% of my debugging. Most of the time I can trim it down to a very small quick running chunk and a couple of print statements, gives me enough insight.

I would also say that I heavily use the ipython repl which gives me a lot of power to inspect things as I am running things.

I also recently learned about the built in python debugger. I had something buried deep into a pipeline that would only error after running for 10 minutes. Python gives you a very convenient breakpoint() in 3.7+ or import pdb; pdb.set_trace() for python 3.7-. ipython also gives you an incredible magic command to run %debug after an error occurs, to allow you to jump into a debugger right where your last error occurred. Again I am still heavily in the print statement debugging camp.