node-inspect-debugger

Debug Node.js processes via the V8 inspector and Chrome DevTools Protocol.

5|2|Updated May 26, 2026
One-click install
npx skills add https://github.com/perasyudha/Nyxora --skill node-inspect-debugger-perasyudha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: node-inspect-debugger
Source: https://github.com/perasyudha/Nyxora/tree/main/packages/core/playbooks/software-development/node-inspect-debugger
Command: npx skills add https://github.com/perasyudha/Nyxora --skill node-inspect-debugger-perasyudha

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 from the terminal to set real breakpoints, step through code, walk call stacks, dump local and closure scopes, and evaluate arbitrary expressions in paused frames. ## Core Features & Use Cases - Interactive REPL Debugging: Use the built-in node inspect CLI to set breakpoints, step in/over/out, watch expressions, and drop into a scoped REPL. - Programmatic CDP Automation: Script breakpoint management, scope capture, CPU profiles, and heap snapshots via chrome-remote-interface for non-interactive agent loops. - Attach to Running Processes: Enable the inspector on live 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 with unclear state. Launch it with --inspect-brk, attach node inspect, set a breakpoint at the suspect line, and inspect closure variables directly in the paused frame. ## Quick Start Ask the agent to run your failing 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 with breakpoints from the terminal?

Run `node inspect script.js` to launch paused on the first line, then use `sb('file.js', 42)` to set breakpoints, `cont` to continue, and `repl` to evaluate expressions in the current scope. The built-in CLI requires no extra installation.

How do I attach a debugger to an already running Node 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`.

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

--inspect starts the inspector but keeps the script running, so execution may pass your breakpoints before you attach. --inspect-brk pauses on the first line, letting you set breakpoints before any code runs.

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 lines, not the .ts source, unless you enable sourcemaps with a CDP client that follows them; the node inspect CLI does not.

Why does my breakpoint never hit when debugging Node?

Common causes are attaching after execution completed (use --inspect-brk), setting breakpoints on TypeScript source lines instead of emitted JS, or debugging the wrong process when child processes are involved. Verify targets via /json/list on port 9229.

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

Use chrome-remote-interface to enable the Profiler or HeapProfiler domains, then call Profiler.start/stop or HeapProfiler.takeHeapSnapshot and write the output to a .cpuprofile or .heapsnapshot file for Chrome DevTools.