Date: January 7th 2016
Last updated: January 18th 2016

My debugging to-date has been to print in a divide-and-conquer kind of way. The idea is to add the print statement in an area of buggy code, rerun the program, review the output, then move the print statement closer to the code that's producing the unexpected result.

The print method has always felt a little dirty to me. I have even thought that I might be the only one doing it. However, when I was looking for debugging options, I noticed that it's an extremely common approach. It's so common that some people have suggested a dubug_print() method (see the resource links below). EDIT: A useful debug print styled tool is available in the logging module.

In short, the print statement is not a recommended debugging option, but I still like it, and I think I will keep using it.

There are many alternatives to print. Below is a list of debugging options. The list includes development environments (IDE) with a graphical interface and several add-on programs to extend existing debuggers like pdb (e.g. pyclewn).

Over the next few days I am going to look at four non-IDE debuggers (bold) that seem popular.

Useful resources:

results matching ""

    No results matching ""