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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for live_debugger-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70694e45dddb08a446e1796f38039c58f861863f3d3b7da2a033696597c54776 |
|
MD5 | 6524cd47bc24768b31c6c4e68f1a9492 |
|
BLAKE2b-256 | 4023db531ed8c0c0c0331d384ae218b96084eeb375dbbb130fac4fff255ae890 |