pdb
The Python debugger allows you to monitor and control execution of a Python program, to examine the values of variables during execution, and to examine the state of a program after abnormal termination (post-mortem analysis).
Section 20.1, “Starting up pdb”.
Section 20.2, “Functions exported by pdb”.
Section 20.3, “Commands available in pdb”.