node-inspect-debugger
What it does
This skill teaches the agent how to find bugs in Node.js programs with the built-in debugger and related tools. It is for developers facing hard-to-find problems such as hangs, flaky tests or memory issues.
When to use it
- ✓When a Node.js program hangs or behaves oddly and the cause is not clear.
- ✓When a test is flaky and you need to pause at the exact point where it fails.
- ✓When you need a memory snapshot or CPU profile to find a slow or leaking part of a Node.js app.
Skill link
https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/ekko-agent/skills/node-inspect-debugger/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“My Node.js script hangs sometimes. Help me pause it at the right line and find out why.”
5 new skills a week. 1 minute to read.
How it works
The agent starts the program with Node's built-in inspector, sets breakpoints and inspects values at each stop. For scripted checks it can also connect to the inspector through a local port.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Node Inspect Debugger
Use when Node.js debugging requires hidden locals, async hangs, flaky tests, child processes, startup races, memory analysis, or CPU profiling.
Default to node inspect first. Use Chrome DevTools Protocol only for scripted breakpoints, automated state capture, heap snapshots, or CPU profiles.
Quick start
node inspect path/to/script.js
node --inspect-brk --import tsx path/to/script.ts
kill -SIGUSR1 <pid>
node inspect -p <pid>
curl -s http://127.0.0.1:9229/json/list | jq
For a test runner such as Vitest, debug one file with one worker and avoid worker pools while stepping.
Debugger REPL
- Continue and step:
cont,next,step,out,pause. - Breakpoints:
sb('file.js', 42),sb(42),sb('functionName'),breakpoints,cb('file.js', 42). - Inspect:
bt,list(8),watch('expr'),exec expr. - Current scope: enter
repl, evaluate locals, then pressCtrl+Cto exit REPL mode. - Exit safely: use
contbefore quitting if the process should keep running; otherwise usekill.
Safe setup
- Prefer
127.0.0.1inspector binds. Do not expose--inspect=0.0.0.0unless the network is isolated. - Use
--enable-source-mapswhen TypeScript source breakpoints need it. NODE_OPTIONS=--inspect-brkcan propagate the inspector to child processes, but each process needs a unique port.- For a long-lived service, confirm the PID and
/json/listtarget before attaching.
Programmatic CDP
Install temporary tooling outside the project unless it is already a dependency:
mkdir -p /tmp/cdp-tools
npm --prefix /tmp/cdp-tools install chrome-remote-interface
NODE_PATH=/tmp/cdp-tools/node_modules node /tmp/cdp-debug.cjs
Minimal driver:
const CDP = require("chrome-remote-interface");
(async () => {
const client = await CDP({ port: 9229 });
const { Debugger, Runtime } = client;
Debugger.paused(async ({ callFrames, reason }) => {
const top = callFrames[0];
console.log("paused", reason, top.url, top.location.lineNumber + 1);
const { result } = await Debugger.evaluateOnCallFrame({
callFrameId: top.callFrameId,
expression: "JSON.stringify({ pid: process.pid })",
});
console.log(result.value ?? result.description);
await Debugger.resume();
});
await Runtime.enable();
await Debugger.enable();
await Debugger.setBreakpointByUrl({ urlRegex: ".*target\\.js$", lineNumber: 41 });
await Runtime.runIfWaitingForDebugger();
})();
Profiles
- CPU: enable
Profiler, start, wait, stop, write a.cpuprofile, then open it in Chrome DevTools. - Heap: enable
HeapProfiler, collectaddHeapSnapshotChunk, calltakeHeapSnapshot, then write a.heapsnapshot.
Pitfalls
--inspectdoes not pause; use--inspect-brkwhen startup code matters.- Port
9229is the default; use--inspect=0or a unique port for parallel targets. - If a breakpoint misses, confirm the path, source maps, and whether execution already passed the line.
- A process that appears frozen after detach may still be paused in the debugger.
FAQ
Is it safe to leave the debugger open on a network?
The skill recommends binding the inspector to 127.0.0.1 and avoids exposing it to all network addresses.
Does it work with TypeScript?
Yes. With source maps, breakpoints can point to the TypeScript source.
Can it debug child processes?
Yes, but each process needs its own port.
Details
Original description by the author
Debug Node.js with node inspect, inspector attach, breakpoints, Chrome DevTools Protocol, heap snapshots, and CPU profiles.
repo: EKKOLearnAI/ekko-studio
Popularity
- GitHub stars
- 12k
- Ranking position
- #11570
- License
- —
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
1password
12kHelps your agent use the 1Password CLI to get secrets for commands and config files without showing them in chat, logs or saved files.
apple-notes
12kHelps your agent create, search, read, edit, move or delete Apple Notes on a Mac, using the memo command line tool.
apple-reminders
12kHelps your agent list, create, edit, complete or delete Apple Reminders and reminder lists on a Mac, using the remindctl tool.
document-to-action-items
12kHelps your agent turn a document, meeting transcript or set of notes into a clear table of tasks, owners, deadlines and decisions.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.