Skip to main content

The most comprehensive offline Python debugging snapshot tool: capture your runtime, system, and project state in one call.

Project description

debugx

The most comprehensive offline Python debugging snapshot tool.

debugx collects a complete snapshot of your Python runtime, host system, project, and application environment in a single command -- and writes it out as a beautiful, self-contained HTML dashboard, a GitHub-issue-ready Markdown file, and a schema-versioned JSON document. Everything runs 100% offline. debugx never uploads data anywhere, ever.

pip install debugx
from debugx import capture

capture()

That's it. You now have debug_report.html, debug_report.json, and debug_report.md in your current directory.

Why debugx?

When a bug report says "it works on my machine," or a teammate needs to understand exactly what environment produced a stack trace, debugx gives you one command that answers almost every follow-up question before it's asked: Python version, installed packages, git branch and dirty state, OS/CPU/memory, Docker/Kubernetes context, network reachability, recent log lines, the active exception -- masked for secrets, formatted for humans, and generated in under two seconds.

Features

  • Runtime: Python version, executable, virtual environment, pip version, loaded modules, threads, GC stats.
  • System: OS, hostname, architecture, CPU, memory, disk usage.
  • Project: git branch/commit/status, pyproject.toml/requirements.txt detection, Poetry/uv detection, project structure.
  • Environment: environment variables and packages, with automatic secret detection and masking.
  • Network: hostname, local IP, DNS status, internet reachability, listening ports -- all local, no data sent.
  • Containers: Docker and Kubernetes detection (namespace, pod, node).
  • Diagnostics: current exception with syntax-highlighted traceback, call stack, recent log lines, warnings.
  • Plugins: register your own health checks with @debugx.plugin -- e.g. "is my database reachable?"
  • Never crashes: every collector and plugin is isolated; a failure is recorded, not raised.
  • Never uploads: no network calls beyond local reachability checks, no telemetry, no analytics.

Installation

pip install debugx

# Optional: richer CPU/memory/process metrics via psutil
pip install "debugx[full]"

Basic usage

from debugx import capture

capture()

Advanced usage

from debugx import capture

capture(
    output=["html", "json", "markdown"],
    include_packages=True,
    include_git=True,
    include_network=True,
    include_processes=True,
    include_ports=True,
    include_logs=True,
    include_runtime=True,
    include_docker=True,
    include_kubernetes=True,
    include_project=True,
    include_environment=True,
    include_stacktrace=True,
    include_performance=True,
    include_threads=True,
    mask_secrets=True,
    output_directory="./reports",
    compress=False,
    verbose=False,
)

Capturing an exception

from debugx import capture

try:
    1 / 0
except ZeroDivisionError as exc:
    capture(exception=exc, output=["html"])

CLI

debugx capture              # write html+json+markdown to the current directory
debugx capture --html -o ./reports
debugx capture --all --compress
debugx capture --no-network --no-processes --verbose
debugx capture --config debugx.toml

debugx report debug_report.json --html   # re-render HTML/Markdown from a saved JSON snapshot

debugx doctor                # environment sanity checks
debugx plugins                # list discovered plugins
debugx system                 # quick system summary, no files written
debugx version

Run debugx --help or debugx <command> --help for the full flag reference.

Plugins

from debugx import plugin

@plugin(name="database", priority=10, timeout=2.0)
def check_database() -> dict:
    return {"status": "healthy"}

Third-party packages can also register plugins via entry points -- see docs/plugin-development.md.

Security

  • debugx never makes network requests that send data anywhere; the only network activity is a bare TCP handshake / DNS lookup used purely to report reachability.
  • debugx never executes arbitrary shell commands; git is invoked with a fixed argument list only.
  • Secrets (passwords, tokens, API keys, JWTs, connection strings, etc.) are detected and replaced with ******** by default in every output. See SECURITY.md.

Documentation

License

MIT -- see LICENSE.

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

debugx-0.1.0.tar.gz (86.1 kB view details)

Uploaded Source

Built Distribution

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

debugx-0.1.0-py3-none-any.whl (61.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: debugx-0.1.0.tar.gz
  • Upload date:
  • Size: 86.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for debugx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cc5578455616bbbfb393eb6ea93774e4f3e5b7caa752767a784e747e798712d8
MD5 40b6f3faf4aea1b72c69613bf7927648
BLAKE2b-256 ecc3ee0667a632e97be88955af4d42d1c7fab1023e817956f9340f345db2a088

See more details on using hashes here.

Provenance

The following attestation bundles were made for debugx-0.1.0.tar.gz:

Publisher: release.yml on probin-dhakal/debugx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: debugx-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 61.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for debugx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dbf97d439c176b1bff48f53ecc13d62c98351aba769a5a9fb833e9e2aaeda686
MD5 ccbce226fed1a2550e0943db8a4b9210
BLAKE2b-256 dbc6f9ef6904e14eaf5384e2c04a9deede516fc53e2d4950e0fb6fd9b598e30a

See more details on using hashes here.

Provenance

The following attestation bundles were made for debugx-0.1.0-py3-none-any.whl:

Publisher: release.yml on probin-dhakal/debugx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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