node-inspect-debugger

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

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/decniner/HermesP1 --skill node-inspect-debugger-decniner
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: node-inspect-debugger
Source: https://github.com/decniner/HermesP1/tree/main/.hermes-backup/skills/software-development/node-inspect-debugger
Command: npx skills add https://github.com/decniner/HermesP1 --skill node-inspect-debugger-decniner

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 node inspect 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 via 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 with unclear state. Launch it with node --inspect-brk, attach the debugger, set a breakpoint at the suspect line, and inspect closure variables that console.log cannot reach. ## Quick Start Ask the agent to run your failing Node script with node --inspect-brk, attach the inspector, 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 path/to/script.js to launch paused on the first line, then use sb('file.js', 42) to set breakpoints, c to continue, n to step over, and repl to evaluate expressions in the current scope.

How do I attach the Node debugger to an already running 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 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 early breakpoints may be missed. --inspect-brk pauses on the first line, letting you set breakpoints before any code executes.

Why do my breakpoints hit the wrong lines in TypeScript files?▼

Breakpoints bind to the emitted JavaScript, not the .ts source. Either break in the built dist/*.js 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 capture a CPU profile or heap snapshot without Chrome DevTools?▼

Yes, use chrome-remote-interface to call Profiler.start/stop for CPU profiles and HeapProfiler.takeHeapSnapshot for heap dumps, writing results to .cpuprofile or .heapsnapshot files viewable later in Chrome DevTools.

When should I not use breakpoint debugging for Node.js?▼

Avoid it for problems console.log solves in under a minute, since breakpoint-driven debugging is heavier. Also note that Python child processes require a Python debugger like debugpy instead of the V8 inspector.