Skip to main content

Capture and share detailed traceback information

Project description

Sharetrace

A Python library & CLI for capturing and sharing comprehensive traceback information.

Overview

Sharetrace makes it easier to share Python exceptions and tracebacks with others by capturing:

  • Full exception details (type, message, traceback)
  • Code context around each frame in the stack trace
  • Git repository information (if available)
  • System information (Python version, platform, etc.)
  • Local variable values at each frame

All this information is saved to a cache directory as JSON files that can later be used to generate shareable HTML reports.

Usage

Capture Traceback Information

import sharetrace

# Install the exception hook (call this early in your program)
sharetrace.install_exception_hook()

# Now any unhandled exceptions will be captured automatically
raise ValueError("This will be captured!")

Generate Shareable HTML Pages

Just invoke the interactive CLI!

sharetrace [--open-browser]

Examples

A demo traceback can be created with sharetrace_demo and visualized with sharetrace.

Notes

  • KeyboardInterrupt and SystemExit are not captured (they use the default handler)
  • If the capture process fails, the original exception is still displayed

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sharetrace-1.0.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file sharetrace-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sharetrace-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.11

File hashes

Hashes for sharetrace-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 727d21565af20485a14a9296e1dc98dc50e82ac64168ef2b31d4721f564efba8
MD5 ae882ad853a48844dfc17cc4b0bb6bfa
BLAKE2b-256 f1f0743f1335b09e4f9038c394e2164af26f19a11b6ac4481064befdce004ecf

See more details on using hashes here.

Supported by

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