pdb

Python's built-in command-line debugger, reached with breakpoint() or python -m pdb script.py.

In more detail

At the (Pdb) prompt the commands worth memorising are n next line, s step into a call, c continue, p expression print a value, l list code, w where am I in the call stack, and q quit. You can type any Python expression to inspect state.

Example

(Pdb) p total
(Pdb) n

Related terms

Taught in

References