pdb.post_mortem()
pdb.post_mortem() is a Python function in the Pdb Module category. Starts the debugger at the given traceback object for post-mortem debugging. The syntax is pdb.post_mortem(tb=None). Returns: None. A typical example: pdb.post_mortem(sys.exc_info()[2]). A close sibling is pdb.set_trace(), which sets a breakpoint in code. When executed, drops into the interactive debugger. A close sibling is pdb.run(), which runs a Python statement under debugger control. A close sibling is pdb.runcall(), which calls a function under debugger control. A close sibling is pdb.pm(), which starts the debugger at the site of the most recent exception (post-mortem debugging). More about this category: Interactive debugger — set_trace, run, pm, post_mortem. Related Pdb Module entries: pdb.set_trace(), pdb.run(), pdb.runcall(), pdb.pm(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try pdb.post_mortem() immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.