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 27.1, “Starting up pdb”.
Section 27.2, “Functions exported by pdb”.
Section 27.3, “Commands available in pdb”.