6.5 Debugging tools

Debugging can be such a pain that there are tools designed to help you find the bugs in your programs called "debuggers." This tutorial will not go into detail on debuggers but it is useful to know that they exist. That way, you can investigate them on your own.

Python comes with a built-in "command line" debugger called PDB. It is documented in the Python manual. PDB is considered a little primitive by those who are used to debuggers with more advanced user interfaces. PythonWin and IDLE both have debuggers that are easier to use than PDB.

There are various commercial debuggers for Python which are more advanced than PythonWin and IDLE. They are typically better at helping you to see the values of your variables. PythonWin and IDLE are also not very good at debugging graphical applications. If your program has a severe bug, it can even crash PythonWin or IDLE. Most commercial IDEs do not have these flaws. Some commercial IDEs also allow debugging of programs running on remote machines or embedded in applications.

ActivePython users are encouraged to try Komodo if PythonWin or IDLE do not meet your needs: http://www.activestate.com/Komdo