node-inspect-debugger

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

Updated Jun 19, 2026
One-click install
npx skills add https://github.com/AmirulAndalib/Vilvona-AI --skill node-inspect-debugger-amirulandalib
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: node-inspect-debugger
Source: https://github.com/AmirulAndalib/Vilvona-AI/tree/main/skills/node-inspect-debugger
Command: npx skills add https://github.com/AmirulAndalib/Vilvona-AI --skill node-inspect-debugger-amirulandalib

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires chrome-remote-interface.

What problem does it solve? Debugging Node.js issues like hidden locals, async hangs, flaky tests, child process bugs, memory growth, and CPU hot paths is difficult without direct inspector access. This Skill provides structured guidance for using the built-in Node.js debugger and Chrome DevTools Protocol to diagnose these problems. ## Core Features & Use Cases - Interactive Debugging: Pause on entry with node inspect, step through code, set breakpoints, and evaluate expressions in the debugger REPL. - Programmatic CDP Automation: Script breakpoints, state capture, heap snapshots, and CPU profiles via chrome-remote-interface when manual inspection is not enough. - Use Case: A Vitest test hangs intermittently. Run it with a single worker under --inspect-brk, attach to the process, set a breakpoint at the suspect line, and inspect local variables to find the race condition. ## Quick Start Debug my Node.js script by pausing on entry with node inspect and setting a breakpoint at the failing function.

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 command line?

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

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

Run node --inspect-brk --import tsx path/to/script.ts to execute TypeScript with the inspector paused on entry. Add --enable-source-maps when you need breakpoints to map back to original TypeScript source lines.

Can I attach the Node.js 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.

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 breakpoint was set. Use --inspect-brk instead of --inspect when setup must happen before code runs.

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

Connect via chrome-remote-interface, enable the Profiler or HeapProfiler domain, then call start/stop for CPU profiles or takeHeapSnapshot for heap data. Write results to .cpuprofile or .heapsnapshot files and open them in Chrome DevTools.