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.txtdetection, 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;
gitis 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. SeeSECURITY.md.
Documentation
License
MIT -- see LICENSE.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc5578455616bbbfb393eb6ea93774e4f3e5b7caa752767a784e747e798712d8
|
|
| MD5 |
40b6f3faf4aea1b72c69613bf7927648
|
|
| BLAKE2b-256 |
ecc3ee0667a632e97be88955af4d42d1c7fab1023e817956f9340f345db2a088
|
Provenance
The following attestation bundles were made for debugx-0.1.0.tar.gz:
Publisher:
release.yml on probin-dhakal/debugx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
debugx-0.1.0.tar.gz -
Subject digest:
cc5578455616bbbfb393eb6ea93774e4f3e5b7caa752767a784e747e798712d8 - Sigstore transparency entry: 2256951841
- Sigstore integration time:
-
Permalink:
probin-dhakal/debugx@48f8eb86a91a317230ae01c54d5937ed4113b945 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/probin-dhakal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@48f8eb86a91a317230ae01c54d5937ed4113b945 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbf97d439c176b1bff48f53ecc13d62c98351aba769a5a9fb833e9e2aaeda686
|
|
| MD5 |
ccbce226fed1a2550e0943db8a4b9210
|
|
| BLAKE2b-256 |
dbc6f9ef6904e14eaf5384e2c04a9deede516fc53e2d4950e0fb6fd9b598e30a
|
Provenance
The following attestation bundles were made for debugx-0.1.0-py3-none-any.whl:
Publisher:
release.yml on probin-dhakal/debugx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
debugx-0.1.0-py3-none-any.whl -
Subject digest:
dbf97d439c176b1bff48f53ecc13d62c98351aba769a5a9fb833e9e2aaeda686 - Sigstore transparency entry: 2256951852
- Sigstore integration time:
-
Permalink:
probin-dhakal/debugx@48f8eb86a91a317230ae01c54d5937ed4113b945 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/probin-dhakal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@48f8eb86a91a317230ae01c54d5937ed4113b945 -
Trigger Event:
release
-
Statement type: