Install
Install with PiG
pig install npm:pi-debuggerInstall with Pi
pi install npm:pi-debuggerPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"skills": [
"./skills"
],
"extensions": [
"./extensions/index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.1.0 (README.md). PiG does not review it.
pi-debugger
Zero-config, multi-session Debug Adapter Protocol (DAP) & V8 Inspector package for the Pi coding agent.
Inspect live variables, conditional breakpoints, call stacks, watch expressions, memory, and disassembly across JavaScript/TypeScript, Python, Go, Rust, C/C++, Swift, Zig, .NET, and Ruby — without writing temporary print/console.log statements or hand-editing adapter configs.
Highlights
- Zero-Config Adapter Discovery:
- Node.js & TypeScript (
.js,.mjs,.cjs,.ts,.tsx): Built-in V8 Inspector backend over nativeWebSocket— always available with zero external downloads. - Python (
.py): Auto-detects project.venv/conda/python3+debugpy, or falls back touv run --no-project --with debugpyso any target Python interpreter can be debugged without installingdebugpyinto your project venv. - Go (
.go): Auto-discovers Delve (dlv dap --listen=127.0.0.1:0). - Rust / C / C++ / Zig / Swift: Auto-discovers
codelldb(PATH or VS Code / Cursor / Windsurf extensions),lldb-dap(PATH, Homebrew LLVM, or macOSxcrun), andgdb >= 14(gdb -i dap). Automatically filters SIMD/register scope noise out of stop snapshots while keepingRegistersavailable on demand. - .NET & Ruby: Auto-discovers
netcoredbgandrdbg.
- Node.js & TypeScript (
- One-Shot
debug_probeTool: Launch a script/test/binary, capture locals + stack + watch expressions across up tomaxHitsconditional breakpoint hits (or uncaught exceptions), and clean up automatically in one tool call. - Live
attachMode: Non-destructively attach to running Node processes by PID (signals V8 viaprocess._debugProcess(pid)) or--inspectport,debugpy.listen((host, port))TCP servers, Delve, or native PIDs — and detach without killing the target service. - Multi-Session Debugging: Debug a client and server (e.g., Python backend
s1+ Node workers2) concurrently in the same Pi turn. - Zero Runtime Dependencies: Pure Node.js built-ins + Pi host peer APIs.
Installation
# From npm (once published)
pi install npm:pi-debugger
# Or directly from GitHub
pi install git:github.com/yiyabo/pi-debugger
Check detected language adapters inside Pi at any time with:
/dap doctor
Provided Tools & Commands
1. debug_probe — One-Shot Runtime Inspection
Best when you want to verify runtime state at specific lines or catch an exception without managing session lifecycle:
{
"program": "src/pricing.py",
"args": ["--region", "eu"],
"breakpoints": [
{ "line": 42, "condition": "discount < 0" }
],
"expressions": ["cart.subtotal", "discount", "tax_rate"],
"maxHits": 3
}
2. debugger — Interactive Multi-Session Controller
Full stateful control across 24 actions:
| Category | Actions |
|---|---|
| Diagnostics | doctor, sessions, switch_session, output, threads |
| Lifecycle | launch, attach, disconnect, restart |
| Breakpoints | set_breakpoints (works before or after launch/attach), clear_breakpoints, list_breakpoints, set_exception_breakpoints |
| Execution | continue, pause, step_over, step_into, step_out |
| Inspection | stack_trace, variables (scopeFilter, variablesReference), evaluate |
| Low-level / Escape Hatch | disassemble, read_memory, custom_request |
3. /dap Slash Command & TUI Status
/dapor/dap sessions— Show active debug sessions and states/dap doctor— Show adapter discovery report for the current workspace/dap stop [sessionId]— Disconnect one or all active debug sessions- Footer status badge automatically displays active session state (
🐞 s1:stopped@app.py:42).
4. runtime-debugging Agent Skill
Bundled skill teaching the agent hypothesis-driven debugging workflows (conditional breakpoints, binary-search narrowing, multi-session client/server tracing, and non-destructive live attach).
Optional Custom Adapter Configuration
Zero configuration is needed for standard toolchains. To add a custom DAP adapter or override defaults, create .pi/dap.json (project) or ~/.pi/agent/dap.json (global), or nest under "dap": { "adapters": { ... } } in settings.json:
{
"adapters": {
"custom-rust": {
"command": "/opt/codelldb/adapter/codelldb",
"args": ["--port", "0"],
"transport": "tcp-spawn",
"languages": ["rust"],
"fileExtensions": [".rs"]
}
}
}
Supported transport modes:
"stdio"— Standard DAPContent-Lengthframing over stdin/stdout"tcp-spawn"— Spawns adapter, parses listening port from stdout/stderr, connects via TCP"tcp-connect"— Connects directly to an already-listening DAP TCP socket (host+port)"node-inspector"— Built-in V8 Inspector backend
Development & Testing
npm install
npm run check
License
MIT