From claude-debug-plugin
Instruments JavaScript code with fetch calls to a local Node.js debug server to capture runtime data for debugging async issues, race conditions, state changes, and control flow.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-debug-plugin:runtime-debuggingThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Capture runtime data from instrumented fetch calls. Use when you need to understand what's happening at runtime - variable values, execution flow, timing, or state changes.
Capture runtime data from instrumented fetch calls. Use when you need to understand what's happening at runtime - variable values, execution flow, timing, or state changes.
Run the bundled server script:
Start it:
node "${CLAUDE_PLUGIN_ROOT}/scripts/debug-server.js" 3333 &
Verify:
curl http://localhost:3333/health
Insert fetch calls at strategic locations:
fetch("http://localhost:3333/debug", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ label: "your-label", data: { key: value } }) }).catch(() => {});
Placement examples:
Function entry/exit:
async function processOrder(orderId) {
fetch("http://localhost:3333/debug", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ label: "processOrder-entry", data: { orderId } }) }).catch(() => {});
// ...
fetch("http://localhost:3333/debug", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ label: "processOrder-exit", data: { result } }) }).catch(() => {});
return result;
}
Error handling:
catch (error) {
fetch("http://localhost:3333/debug", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ label: "error", data: { message: error.message, stack: error.stack } }) }).catch(() => {});
throw error;
}
Tell the user:
"I've added debug instrumentation. Please reproduce the issue now, then let me know when done."
cat .claude-debug/debug.log
Look for:
pkill -f "debug-server.js"
rm -rf .claude-debug/
Remove the fetch instrumentation from the code.
| Pattern | Example | Use For |
|---|---|---|
fn-entry | processOrder-entry | Function start |
fn-exit | processOrder-exit | Function end |
error | error-auth | Caught errors |
state | state-before | State changes |
branch | branch-early-return | Control flow |
npx claudepluginhub pzep1/claudecode-debug-mode --plugin claude-debug-pluginGuides evidence-driven debugging: state hypothesis, add minimal instrumentation (logs, breakpoints, probes), record observations to confirm or refute theories in async, distributed, or production systems.
Investigates and diagnoses software bugs using scientific method: observe symptoms, hypothesize causes, test with logging/Bash/Grep/Glob, analyze without fixing. Use before /fix for root cause.
Debugs crashing programs, failing tests, or incorrect code outputs by pausing at breakpoints to inspect runtime state, variables, types, call stacks. Attaches to running servers by PID without restarts.