node-inspect-debugger

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

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

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 debugging sessions with chrome-remote-interface to automate many breakpoints, capture scope state across runs, and collect CPU profiles or heap snapshots non-interactively. - Attach to Running Processes: Enable the inspector on live processes with SIGUSR1 and attach by PID or WebSocket URL, including TypeScript via tsx and Vitest test runs. - Use Case: A Vitest test fails and you need intermediate state — launch it with --inspect-brk, attach node inspect, set a breakpoint on the suspect line, and inspect locals 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 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 use 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 printed by Node. You can list inspectable targets at 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 race past 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, not the .ts source, unless you enable sourcemaps with --enable-source-maps and use a CDP client that follows them.

Why does my breakpoint never hit when debugging Node?

Common causes are attaching after execution finished (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 and check the source listing at pause.

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

Use chrome-remote-interface to drive the Profiler and HeapProfiler domains over CDP. Start and stop Profiler for a .cpuprofile, or call takeHeapSnapshot and write the chunks to a .heapsnapshot file, then open either in Chrome DevTools.