node-inspect-debugger

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

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

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 CLI Debugging: Use the built-in node inspect REPL for breakpoints, stepping, watchers, and an in-scope 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. - Real-World Scenarios: Attach to a running dev server with SIGUSR1, debug Ink-based TUI apps built with tsx, or run Vitest tests paused on entry 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 from the command line?

Run node inspect path/to/script.js to launch the built-in debugger paused on the first line. Use sb() to set breakpoints, c to continue, n to step over, 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 connect to the printed WebSocket URL on port 9229.

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.

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?

Common causes are attaching after execution finished, missing --inspect-brk, or setting breakpoints on TypeScript source lines that do not match the emitted JavaScript. Verify targets with curl http://127.0.0.1:9229/json/list.

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

Use chrome-remote-interface to enable the HeapProfiler or Profiler domains over CDP, then call takeHeapSnapshot or start/stop profiling and write the output to a file for Chrome DevTools analysis.