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.
npx claudepluginhub pzep1/claudecode-debug-mode --plugin claude-debug-pluginThis skill is limited to using the following tools:
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.
Guides evidence-driven debugging: state hypothesis, add minimal instrumentation (logs, breakpoints, probes), record observations to confirm or refute theories in async, distributed, or production systems.
Guides error debugging: triage stack traces with AI subagent, collect observability data (Sentry/DataDog), generate ranked hypotheses, select strategies (VS Code, chaos engineering).
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.
Share bugs, ideas, or general feedback.
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 |