Node Inspect Debugger

by v1.0.0

This skill provides comprehensive guidance for debugging Node.js applications, addressing complex scenarios such as hidden locals, async hangs, flaky tests, child processes, startup races, memory growth, and CPU hot paths. It emphasizes starting with the built-in `node inspect` for interactive debugging, offering commands for stepping, breakpoints, and scope inspection within a REPL.

For more advanced use cases, the skill details how to leverage the Chrome DevTools Protocol (CDP) for programmatic control, enabling scripted breakpoints, automated state capture, and the generation of heap and CPU profiles. It includes practical quick-start examples, OpenClaw-specific tips, and a minimal CDP driver script, making it an invaluable resource for developers seeking to master Node.js debugging and performance analysis.

What It Does

This skill provides comprehensive guidance and commands for debugging Node.js applications. It covers interactive debugging with `node inspect`, advanced programmatic control via the Chrome DevTools Protocol (CDP), and methods for capturing heap and CPU profiles.

When To Use

Debugging complex Node.js issues (hidden locals, async hangs, flaky tests)
Analyzing memory growth or CPU hot paths in Node.js applications
Debugging child processes or startup races
Automating debugging tasks with scripted breakpoints or state capture
When needing deep inspector access beyond basic logging
Profiling application performance (CPU and Heap snapshots)

Inputs

Node.js application code, process IDs (PIDs), debugger commands, CDP scripts.

Outputs

Debugging insights, call stack information, variable states, heap snapshots, CPU profiles, process control (pause/resume).

Limitations

Requires understanding of Node.js execution and debugging concepts.
Programmatic CDP requires external `chrome-remote-interface` dependency.
Debugging worker pools (e.g., Vitest) can be complex; single-worker debugging is recommended.
Careful port management is needed for parallel debugging targets.
Process might remain paused if debugger detaches improperly.

Installation

Add to Cline skills directory

View Cline documentation

Add to ~/.gemini/skills/

View Gemini CLI documentation

Add to Copilot workspace settings

View GitHub Copilot documentation

Configure in .aider.conf.yml

View Aider documentation

Copy to ~/.claude/skills/

View Claude (Anthropic) documentation

Add to .vscode/skills/

View VS Code documentation

What people say, and where to get help

No ratings yet. If you have used this skill, yours would be the first.

No reviews yet

This skill has not been rated. If you have run it, a short note about what you used it for helps the next person more than any description can.

Related Skills You May Like

Discover more AI agent skills in the same category to enhance your workflow automation.

Have a Skill to Share?

Join the community and help AI agents learn new capabilities. Submit your skill and reach thousands of developers.