Python Pdb Module
Interactive debugger — set_trace, run, pm, post_mortem. This category documents 5 Python pdb module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: pdb.set_trace(), pdb.run(), pdb.runcall(), pdb.pm(), pdb.post_mortem(). pdb.set_trace() sets a breakpoint in code. When executed, drops into the interactive debugger. pdb.run() runs a Python statement under debugger control. pdb.runcall() calls a function under debugger control. pdb.pm() starts the debugger at the site of the most recent exception (post-mortem debugging). pdb.post_mortem() starts the debugger at the given traceback object for post-mortem debugging. Pdb Module belongs to the Dev Tools group alongside Inspect Module, Traceback Module, Timeit Module, GC Module. You can also search across every category from the search page, browse the complete A–Z index, or try any example in the Python playground.