debugwand 🪄
A zero-preparation remote debugger for Python applications running in Kubernetes clusters or Docker containers.
Made possible by the Python 3.14 remote debugging attachment protocol and debugpy
Note:
debugwandis experimental and not made for production. Use at your own risk.
Features
- Zero-preparation debugging - No code changes or restarts required
- Full breakpoint debugging - Using
debugpy - Kubernetes-native - Handles pod discovery, service routing, and Knative
- Container support - Debug Python processes in local Podman or Docker containers
- Process selection - Interactive selection with CPU/memory metrics
Requirements
- Python 3.14+ on both local machine and target
- debugpy installed in the target container
- kubectl (for Kubernetes) or Docker CLI (for containers)
- SYS_PTRACE capability - on Linux/containers (see troubleshooting)
Quick Start
Kubernetes
# List pods and Python processes
wand pods -n my-namespace -s my-service --with-pids
# Debug a live process
wand debug -n my-namespace -s my-service
Docker/Podman
# Debug a container (must have SYS_PTRACE capability)
wand debug --container my-container
Containers must be started with
--cap-add=SYS_PTRACEand-p 5679:5679
Connect your editor
VSCode launch configuration:
{
"name": "Attach to debugwand",
"type": "debugpy",
"request": "attach",
"connect": { "host": "localhost", "port": 5679 },
"pathMappings": [{ "localRoot": "${workspaceFolder}", "remoteRoot": "/app" }]
}
Other DAP clients: Connect to localhost:5679
Configuration
| Environment Variable | Description |
|---|---|
DEBUGWAND_SIMPLE_UI |
Set to 1 for simplified output (useful for Tilt/CI) |
DEBUGWAND_AUTO_SELECT_POD |
Set to 1 to auto-select the newest pod |
Additional Documentation
- Hot-Reload Support - Debugging with uvicorn
--reloadmode - Troubleshooting - Common issues and solutions
How it works
┌─────────────────┐ ┌────────────────────┐
│ Local Machine │ │ Pod / Container │
│ │ │ │
│ debugwand CLI │◄─ kubectl/docker/podman ─► │ Python App │
└────────┬────────┘ └────────┬───────────┘
│ │
│ 1. Discover pods (k8s only) │
├─────────────────────────────────────────────►│
│ │
│ 2. List Python processes │
├─────────────────────────────────────────────►│
│ │
│ 3. Select process │
│ │
│ 4. Inject debugpy via │
│ sys.remote_exec() │
├─────────────────────────────────────────────►│
│ │
│ 5. debugpy.listen()
│ ┌──────────────┤
│ 6. Port-forward (k8s) │ │
│ or exposed port │ │
│◄──────────────────────────────┼─────────────►│
│ localhost:5679 │ │
│ └──────────────┤
│ 7. Connect editor │
├──────────────────────────────────────────────┤
│ Debugging Session │
│◄────────────────────────────────────────────►│
License
MIT
Metadata
Release files for debugwand 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| debugwand-0.5.0.tar.gz | 158.4 kB | Without provenance | Details for debugwand-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| debugwand-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for debugwand-0.5.0-py3-none-any.whl |
Total release size: 180.9 kB
Release files / debugwand-0.5.0.tar.gz
| Download URL | debugwand-0.5.0.tar.gz |
|---|---|
| Size | 158.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d18328f8e684d4b155b7cc5bca94c3cdb702ffc8b39a4e2bf568d667fb1f2d2e
|
|
BLAKE2b-256 checksum How to use checksums |
fab10ef12d4ec68ac33545d3506a73ade0fffffcc674dca28cb9e0ecbf00e4a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.5 {"installer":{"name":"uv","version":"0.11.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / debugwand-0.5.0-py3-none-any.whl
| Download URL | debugwand-0.5.0-py3-none-any.whl |
|---|---|
| Size | 22.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b6a1299a9dbfd6bd6dcb0893cd62088287ccdd6eaef57af0ccb02c332bd0bc9
|
|
BLAKE2b-256 checksum How to use checksums |
535c62d63507218d237ea9da78d8ebad1b6422919fe529ce4e64871425a50253
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.5 {"installer":{"name":"uv","version":"0.11.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for debugwand 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.