node-inspect-debugger

Debug Node.js processes using node inspect, CDP breakpoints, heap snapshots, and CPU profiles.

1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/JEROME-PRAKASH-L/openclaw --skill node-inspect-debugger-jerome-prakash-l
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: node-inspect-debugger
Source: https://github.com/JEROME-PRAKASH-L/openclaw/tree/main/skills/node-inspect-debugger
Command: npx skills add https://github.com/JEROME-PRAKASH-L/openclaw --skill node-inspect-debugger-jerome-prakash-l

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires chrome-remote-interface.

What problem does it solve? Diagnosing Node.js issues like hidden locals, async hangs, flaky tests, memory growth, and CPU hot paths is difficult without direct inspector access. This Skill provides structured guidance for attaching debuggers, setting breakpoints, and capturing profiles. ## Core Features & Use Cases - Interactive Debugging: Use node inspect REPL commands to step through code, set breakpoints, and evaluate local variables in scope. - Programmatic CDP Automation: Drive the Chrome DevTools Protocol with chrome-remote-interface for scripted breakpoints and automated state capture. - Profiling: Capture CPU profiles and heap snapshots for performance and memory leak analysis. - Use Case: When a Vitest test flakes intermittently, run it with a single worker under --inspect-brk, attach the debugger, and inspect async state at the failure point. ## Quick Start Ask the assistant to debug a Node.js script by pausing on entry with node inspect and inspecting local variables at a breakpoint.

Frequently Asked Questions about node-inspect-debugger

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a Node.js script with breakpoints from the terminal?

Run node inspect path/to/script.js to pause on entry, then use commands like sb('file.js', 42) to set breakpoints, cont to continue, and next or step to move through code. Use repl to evaluate local variables in the current scope.

How do I debug TypeScript files with Node.js inspector?

Run node --inspect-brk --import tsx path/to/script.ts to pause before execution with TypeScript support. Add --enable-source-maps when you need breakpoints to map back to original TypeScript source lines.

Can I attach the Node debugger to an already running process?

Yes, send kill -SIGUSR1 <pid> to enable the inspector on a running process, then connect with node inspect -p <pid>. Confirm the target first by querying http://127.0.0.1:9229/json/list.

What is the difference between --inspect and --inspect-brk?

--inspect opens the debug port without pausing, so early code runs before you attach. Use --inspect-brk when setup must happen before any code executes, such as catching startup races.

Why does my Node.js breakpoint never get hit?

Breakpoints miss when the file path is wrong, source maps are misconfigured, or execution already passed the line before the debugger attached. Verify the file path, enable source maps for TypeScript, and use --inspect-brk for early code.

How do I capture a CPU profile or heap snapshot in Node.js?

Use the Chrome DevTools Protocol with chrome-remote-interface: enable Profiler, call start and stop, then write the result as a .cpuprofile file. For memory, enable HeapProfiler, collect addHeapSnapshotChunk events, and call takeHeapSnapshot.