node-inspect-debugger

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

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/loteiron/ZeusAgent --skill node-inspect-debugger-loteiron
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: node-inspect-debugger
Source: https://github.com/loteiron/ZeusAgent/tree/main/skills/software-development/node-inspect-debugger
Command: npx skills add https://github.com/loteiron/ZeusAgent --skill node-inspect-debugger-loteiron

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 with zero installation. - Programmatic CDP automation: Script breakpoint management, scope capture, CPU profiles, and heap snapshots through chrome-remote-interface for non-interactive agent loops. - 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 on 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 suspect 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 path/to/script.js` to launch the built-in debugger paused on the first line. From the debug prompt you can set breakpoints with sb(), step with n/s/o, and enter a scoped REPL to evaluate expressions against live locals.

How to attach a debugger to a 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 printed by Node. You can also list targets at http://127.0.0.1:9229/json/list.

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

node inspect is built-in and best for quick interactive poking with zero install. chrome-remote-interface is scriptable from Node or Python, making it better for automating many breakpoints, capturing scope state across runs, or collecting CPU and heap profiles.

Why do breakpoints hit wrong lines in TypeScript projects?▼

Breakpoints bind to the emitted JavaScript, not the .ts source. Either set breakpoints in the built dist files, or run Node with --enable-source-maps and use a CDP client that follows sourcemaps, since the node inspect CLI does not.

Can I debug Vitest tests with the Node inspector?▼

Yes. Run `node --inspect-brk ./node_modules/vitest/vitest.mjs run --no-file-parallelism your.test.tsx`, then attach with node inspect from another terminal. The --no-file-parallelism flag ensures a single worker so breakpoints behave predictably.

When should I not use breakpoint debugging for Node?▼

Avoid it for problems console.log solves in under a minute, since breakpoint-driven debugging is heavier. Also note that --inspect on a parent process does not inspect child processes unless you propagate it via NODE_OPTIONS.