node-inspect-debugger

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

Updated May 13, 2026
One-click install
npx skills add https://github.com/superfhp/lumi-agent-body --skill node-inspect-debugger-superfhp
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: node-inspect-debugger
Source: https://github.com/superfhp/lumi-agent-body/tree/main/skills/software-development/node-inspect-debugger
Command: npx skills add https://github.com/superfhp/lumi-agent-body --skill node-inspect-debugger-superfhp

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. - Real-world scenarios: Attach to a running dev server with SIGUSR1, debug Ink-based TUI apps built with tsx, or run Vitest suites paused under the debugger with --inspect-brk. ## Quick Start Ask the AI to launch your Node script with node inspect, set a breakpoint at the failing line, and inspect 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 the built-in debugger paused on the first line. 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>, which starts the inspector on port 9229. Then attach with node inspect -p <pid> or connect to the WebSocket URL printed in the output.

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

--inspect starts the inspector but lets the script run immediately, so early breakpoints may be missed. --inspect-brk pauses execution on the first line, giving you time to 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.

Why does my breakpoint never hit when debugging Node.js?▼

Common causes are attaching after execution finished, missing --inspect-brk, or setting breakpoints on TypeScript source lines instead of the compiled output. Verify the target with curl http://127.0.0.1:9229/json/list and check the paused file matches.

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

Use chrome-remote-interface to enable the Profiler or HeapProfiler domains over CDP. Start profiling, wait, then stop and write the result to a .cpuprofile or .heapsnapshot file for analysis in Chrome DevTools.