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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file live_debugger-0.1.0.tar.gz.

File metadata

  • Download URL: live_debugger-0.1.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.8.16

File hashes

Hashes for live_debugger-0.1.0.tar.gz
Algorithm Hash digest
SHA256 102809dc64118690dd00c89fff21d71afdd3dd6fd269e043d3f51eb365f91366
MD5 963bc96c4482861a90499555da475e22
BLAKE2b-256 60b142b8ad01642b6ef681d0c4ad8acf357d3f2c5222b60f35018c816110477f

See more details on using hashes here.

File details

Details for the file live_debugger-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: live_debugger-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.8.16

File hashes

Hashes for live_debugger-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70694e45dddb08a446e1796f38039c58f861863f3d3b7da2a033696597c54776
MD5 6524cd47bc24768b31c6c4e68f1a9492
BLAKE2b-256 4023db531ed8c0c0c0331d384ae218b96084eeb375dbbb130fac4fff255ae890

See more details on using hashes here.

Supported by

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