Skip to main content

A simple library for CPython that allows you to collect stacktrace data from running processes in production environments without stopping the execution of the process.

Project description

Overview

Live Debugger is a library for CPython that allows to collect stacktrace data from running processes in production environments without stopping the world. The library provides safe building blocks and concepts for developers to collect stack snapshot from processes. It is designed to be minimal and extensible. It also makes no assumptions on what the process plans to do with the collected data, focusing only on providing immutable safe data.

The debugger implementation uses CPython debugging functions available in the standard library to intercept function call and collect stack frames data. Stackframes are transformed into immutable data structures so no harm can be done to the running process.

The main benefits of using this library are:

  • Free (as in freedom)

  • Depends only on CPython standard libraries

  • Easy to extend

  • Easy to use

  • Small codebase

Installation

This library is available in PyPI so you can install it as a normal Python package:

pip install live-debugger

Usage

>>> from live_debugger import api
>>> cookie = api.add_point("flask_example/app.py", 33, print)
>>> api.clear_point(cookie)

Next

  • Async support

  • Anonymization

Credits

  • Yunier Rojas García

  • ChatGPT – for helping me writing this README

License

AGPL v3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

live_debugger-0.1.0.tar.gz (18.9 kB view hashes)

Uploaded Source

Built Distribution

live_debugger-0.1.0-py3-none-any.whl (21.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page