This is probably old news to most folks, but I only found out about this recently, more than twelve years into being a Python programmer. The pdb (Python Debugger) module has a few useful functions. For years I’ve been using pdb.pm(), the postmortem debugger. It can be run from the Python shell to invoke a …