Skip to content
/ pypm Public
forked from masipcat/pypm

Create coredump like file from Python to post-mortem debug later

Notifications You must be signed in to change notification settings

onna/pypm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pypm

I got this idea of saving interpreter state after exception so I can interactively debug my long running programs.

Most often, this happens when wrangling some data and such.

In this fork, I am using argparse and did some light refactoring.

Installation

Just run pip install pm.py

Usage

You have to call pypm.freeze_traceback() in an except block. This function returns a FrozenTraceback object that can be saved to a file using pypm.dump(frozen_traceback, file).

You can reraise your exception again. See example.py for an, well, example...

When the dump file is saved, you can use $ pypm my.dump to get into an interactive post mortem debugging. See pypm --help for options.

About

Create coredump like file from Python to post-mortem debug later

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%