Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Debug Node.js via --inspect + Chrome DevTools Protocol.
.claude/skills/hezaohezao-node-inspect-debugger/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -48% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 6% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -1% | 0% |
| case-03 | ✓→✓ | = Same ✓ | -8% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 5% | 0% |
When console.log isn't enough, drive Node's built-in V8 inspector programmatically from the terminal. Real breakpoints, step in/over/out, call-stack walking, scope dumps, and arbitrary expression evaluation.
Prefer node inspect first. It's always available and the REPL is fast.
console.log can't reachDon't use for: things console.log solves in under a minute.
node inspect REPLLaunch paused on first line:
bashnode inspect path/to/script.js # or with tsx node --inspect-brk $(which tsx) path/to/script.ts
The debug> prompt accepts:
| Command | Action | |---------|--------| | c | continue | | n | next line (step over) | | s | step into | | o | step out | | sb('file.js', line) | set breakpoint | | cb('file.js', line) | clear breakpoint | | watch('expr') | watch expression | | exec('expr') | evaluate in paused frame | | backtrace / bt | show call stack | | list(N) | show N lines around current |
For automated debugging (many breakpoints, collect state across runs):
bash# Install npm install chrome-remote-interface # Launch node with inspect node --inspect-brk=9229 path/to/script.js & # Attach via script node -e " const CDP = require('chrome-remote-interface'); (async () => { const client = await CDP({port: 9229}); const {Debugger, Runtime} = client; await Debugger.enable(); await Runtime.enable(); Debugger.paused(({callFrames}) => { console.log('Paused at:', callFrames[0].location); // Inspect scope, evaluate expressions, etc. }); // Set breakpoint await Debugger.setBreakpointByUrl({lineNumber: 10, url: 'file:///path/to/script.js'}); await Debugger.resume(); })(); "
bash# Start with --inspect (no brk = doesn't pause on start) node --inspect=9229 path/to/server.js # Attach from another terminal node inspect localhost:9229
bash# Start with inspect node --inspect path/to/script.js # In another terminal, capture profile node -e " const CDP = require('chrome-remote-interface'); (async () => { const client = await CDP({port: 9229}); const {Profiler} = client; await Profiler.enable(); await Profiler.start(); // Wait for workload... await new Promise(r => setTimeout(r, 10000)); const {profile} = await Profiler.stop(); require('fs').writeFileSync('profile.cpuprofile', JSON.stringify(profile)); })(); " # Load profile.cpuprofile in Chrome DevTools > Performance
--inspect doesn't pause; --inspect-brkpauses on first line. Use brk when you need to catch early code.
--inspect=9230.node inspect works with both, but ESM may show differentcall stack formatting.
--enable-source-maps for accurate mapping.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 25,524 | 8,913 | -65% | 1 | 1 | 0% | 4,782 | 2,466 | -48% | 0 | 0 | — |
case-02 | fail→pass | 15,853 | 5,282 | -67% | 1 | 1 | 0% | 1,635 | 1,726 | +6% | 0 | 0 | — |
case-03 | pass→pass | 19,011 | 10,819 | -43% | 1 | 1 | 0% | 3,329 | 3,050 | -8% | 0 | 0 | — |
case-04 | pass→pass | 10,606 | 5,469 | -48% | 1 | 1 | 0% | 1,515 | 1,596 | +5% | 0 | 0 | — |
case-05 | pass→pass | 16,431 | 13,342 | -19% | 1 | 1 | 0% | 2,984 | 3,293 | +10% | 0 | 0 | — |
case-06 | pass→pass | 15,363 | 13,294 | -13% | 1 | 1 | 0% | 2,211 | 3,199 | +45% | 0 | 0 | — |
case-07 | fail→pass | 12,059 | 12,972 | +8% | 1 | 1 | 0% | 1,867 | 1,845 | -1% | 0 | 0 | — |
case-08 | pass→pass | 4,858 | 3,119 | -36% | 1 | 1 | 0% | 338 | 1,273 | +277% | 0 | 0 | — |
case-09 | pass→pass | 3,206 | 2,199 | -31% | 1 | 1 | 0% | 326 | 1,157 | +255% | 0 | 0 | — |
case-10 | pass→pass | 3,759 | 2,809 | -25% | 1 | 1 | 0% | 460 | 1,306 | +184% | 0 | 0 | — |
case-11 | pass→pass | 5,716 | 2,713 | -53% | 1 | 1 | 0% | 749 | 1,323 | +77% | 0 | 0 | — |
case-12 | pass→pass | 6,089 | 4,626 | -24% | 1 | 1 | 0% | 944 | 1,422 | +51% | 0 | 0 | — |
case-13 | pass→pass | 5,592 | 13,942 | +149% | 1 | 1 | 0% | 877 | 1,392 | +59% | 0 | 0 | — |
case-14 | pass→pass | 4,115 | 2,286 | -44% | 1 | 1 | 0% | 438 | 1,168 | +167% | 0 | 0 | — |
case-15 | pass→pass | 4,299 | 2,739 | -36% | 1 | 1 | 0% | 534 | 1,224 | +129% | 0 | 0 | — |
case-16 | pass→pass | 8,194 | 3,749 | -54% | 1 | 1 | 0% | 1,210 | 1,570 | +30% | 0 | 0 | — |
case-17 | pass→pass | 5,364 | 4,295 | -20% | 1 | 1 | 0% | 922 | 1,527 | +66% | 0 | 0 | — |
case-18 | pass→pass | 21,048 | 9,918 | -53% | 1 | 1 | 0% | 2,197 | 2,530 | +15% | 0 | 0 | — |
case-19 | pass→pass | 33,831 | 10,947 | -68% | 1 | 1 | 0% | 2,329 | 2,618 | +12% | 0 | 0 | — |
case-20 | pass→pass | 5,372 | 3,724 | -31% | 1 | 1 | 0% | 734 | 1,389 | +89% | 0 | 0 | — |
case-21 | pass→pass | 5,885 | 4,535 | -23% | 1 | 1 | 0% | 908 | 1,629 | +79% | 0 | 0 | — |
case-22 | pass→pass | 4,585 | 3,126 | -32% | 1 | 1 | 0% | 745 | 1,387 | +86% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +14 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.