r/madeinpython • • Aug 10 '22

debuglater: dump Python traceback for later debugging

Hi r/madeinpython!

We just released debuglater, an open-source library that serializes a Python traceback object for later debugging.

Countless times, we've scheduled overnight jobs to find out the following day that they failed. While logs are helpful, they are often insufficient for debugging. debuglater allows you to store the traceback object so you can start a debugging session at any moment.

We built this to support our open-source framework for data scientists, who often execute long-running code in remote environments. However, we realized this could be useful for the Python community, so we created a separate package. This project is a fork of Eli Finer's pydump, so kudos to him for laying the foundations! We made a few improvements like compatibility with recent Python versions and integration with IPython/Jupyter.

The implementation is quite interesting. You can see it here. The serialization step has two parts: it takes the traceback object and wraps it into a new object so it can be serialized; secondly, it stores the source code so you can debug even if you don't have access to the source code!

Please take it for a spin and let us know your feedback. Feel free to open an issue on GitHub if you find any quirks!

22 Upvotes

4 comments sorted by

View all comments

3

u/houseofleft Aug 10 '22

This is a really awesome idea! Gonna check it out

1

u/[deleted] Aug 10 '22

please share your feedback! and feel free to open an issue if you have any issues!