A zero-preparation remote debugger for Python applications running in Kubernetes clusters or Docker containers.
Project description
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
- Docker container support - Debug Python processes in local 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
# 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 โโบโ 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
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
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 debugwand-0.4.2.tar.gz.
File metadata
- Download URL: debugwand-0.4.2.tar.gz
- Upload date:
- Size: 157.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e60552c8b5d517a3944916e97dae8e03dcfb82b4435d74900095188e50d0cad4
|
|
| MD5 |
971ae55ffb38db5fb8a230078d1ef482
|
|
| BLAKE2b-256 |
04d3f550ca7f75af97cb9aefdab2d541ad0105389248133b73908ed26ab2f088
|
File details
Details for the file debugwand-0.4.2-py3-none-any.whl.
File metadata
- Download URL: debugwand-0.4.2-py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5316905c195b5ec08cf73b11750872df24d8831eac49771fba1e60ab95ed6974
|
|
| MD5 |
baf68facd15d5605540e68918834d6b2
|
|
| BLAKE2b-256 |
08720d21a6effea61a2700fabf00b2e60673e004a69be7b7fa5cfe8883f3d586
|