node-inspect-debugger

Debug Node.js processes via --inspect and Chrome DevTools Protocol from the terminal.

Updated Jun 7, 2026
One-click install
npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill node-inspect-debugger-chensihakniroth
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: node-inspect-debugger
Source: https://github.com/Chensihakniroth/ANAKOT-AGENT/tree/main/skills/software-development/node-inspect-debugger
Command: npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill node-inspect-debugger-chensihakniroth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires chrome-remote-interface.

What problem does it solve? When console.log is not enough, this Skill lets you drive Node's built-in V8 inspector programmatically from the terminal, giving you real breakpoints, step in/over/out, call-stack walking, scope dumps, and expression evaluation in paused frames. ## Core Features & Use Cases - Interactive REPL Debugging: Use the built-in node inspect CLI to set breakpoints, step through code, watch expressions, and drop into a scoped REPL with zero installation. - Programmatic CDP Automation: Script breakpoint placement, scope capture, and expression evaluation via chrome-remote-interface for non-interactive or agent-driven debugging. - Attach to Running Processes: Enable the inspector on live Node processes with SIGUSR1 and attach by PID or WebSocket URL, including Ink-based TUI apps and Vitest test runs. - Use Case: A Vitest test fails in a tsx project and you need intermediate state. Launch the test with --inspect-brk, attach node inspect, set a breakpoint in the suspect file, and inspect locals and closures in the paused frame. ## Quick Start Ask the agent to run your Node script with --inspect-brk, attach the node inspect debugger, set a breakpoint at the failing line, and print the local variables when it pauses.

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 from the command line?▼

Run `node inspect script.js` to launch the built-in debugger paused on the first line. Use commands like `sb('file.js', 42)` to set breakpoints, `cont` to continue, `next` to step over, and `repl` to evaluate expressions in the current scope.

How to attach a debugger to a running Node.js process?▼

Send SIGUSR1 to the process with `kill -SIGUSR1 <pid>` to enable the inspector, then attach with `node inspect -p <pid>` or via the WebSocket URL from `curl http://127.0.0.1:9229/json/list`.

node inspect vs chrome-remote-interface for debugging?▼

node inspect is built-in with zero install and best for quick interactive poking via its REPL. chrome-remote-interface is scriptable from Node or Python and better for automating many breakpoints, collecting state across runs, or non-interactive agent loops.

Can I debug TypeScript or tsx files with node inspect?▼

Yes, launch with `node --inspect-brk --import tsx script.ts`. Note that breakpoints hit the emitted JavaScript, not the .ts source, unless you enable sourcemaps with `--enable-source-maps` and use a CDP client that follows them.

Why does my breakpoint not hit when debugging Node.js?▼

The most common cause is using `--inspect` instead of `--inspect-brk`, so the script runs past your breakpoint before you attach. Also verify the target with `curl http://127.0.0.1:9229/json/list` and check for sourcemap line mismatches in TypeScript.

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

Use the CDP Profiler and HeapProfiler domains via chrome-remote-interface. Start the profiler, wait, then stop and write the result to a .cpuprofile or .heapsnapshot file, which you can open in Chrome DevTools.