node-inspect-debugger

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

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

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 breakpoints, scope capture, CPU profiles, and heap snapshots 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 TypeScript project. Launch it with node --inspect-brk, attach the debugger, set a breakpoint in the suspect file, and inspect closure state that console.log cannot reach. ## Quick Start Ask the agent to debug a Node.js script by launching it with --inspect-brk, attaching node inspect, setting a breakpoint at the failing line, and inspecting 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() to set breakpoints, n/s/o to step, bt for backtraces, and repl to evaluate expressions in the current scope.

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

Breakpoints land on the emitted JavaScript, not the .ts source. Either break in the built dist/*.js files or run with --enable-source-maps and use a CDP client that follows sourcemaps, since the node inspect CLI does not.

Can I capture a heap snapshot or CPU profile without Chrome DevTools?

Yes, use chrome-remote-interface to drive the HeapProfiler and Profiler domains programmatically. The captured .heapsnapshot and .cpuprofile files can then be opened in Chrome DevTools for analysis.

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.