node-inspect-debugger
하는 일
이 스킬은 내장 디버거와 관련 도구로 Node.js 프로그램의 버그를 찾는 방법을 에이전트에게 가르칩니다. 멈춤, 불안정한 테스트, 메모리 문제처럼 찾기 어려운 문제를 겪는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓Node.js 프로그램이 멈추거나 이상하게 동작하는데 원인이 분명하지 않을 때.
- ✓테스트가 불안정해서 실패하는 정확한 지점에서 멈춰야 할 때.
- ✓느리거나 메모리가 새는 부분을 찾기 위해 메모리 스냅샷이나 CPU 프로파일이 필요할 때.
스킬 링크
https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/ekko-agent/skills/node-inspect-debugger/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 Node.js 스크립트가 가끔 멈춥니다. 맞는 줄에서 멈추게 하고 원인을 찾도록 도와주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 Node의 내장 인스펙터로 프로그램을 시작하고, 중단점을 설정하며, 멈출 때마다 값을 확인합니다. 스크립트로 된 점검에서는 로컬 포트를 통해 인스펙터에 연결할 수도 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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.
자주 묻는 질문
디버거를 네트워크에 열어 두어도 안전한가요?
스킬은 인스펙터를 127.0.0.1에 묶도록 권장하며, 모든 네트워크 주소에 노출하지 않도록 합니다.
TypeScript에서도 작동하나요?
네. 소스 맵이 있으면 중단점이 TypeScript 소스를 가리킬 수 있습니다.
자식 프로세스도 디버그할 수 있나요?
네. 다만 프로세스마다 각자 포트가 필요합니다.
상세 정보
작성자의 원본 설명
Debug Node.js with node inspect, inspector attach, breakpoints, Chrome DevTools Protocol, heap snapshots, and CPU profiles.
repo: EKKOLearnAI/ekko-studio
인기도
- GitHub 스타
- 12k
- 순위
- #11570
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
1password
12k에이전트가 1Password CLI로 명령과 설정 파일에 필요한 비밀 값을 가져오되, 채팅, 로그, 저장 파일에는 보이지 않게 하도록 돕습니다.
apple-notes
12k에이전트가 memo 명령줄 도구를 사용해 Mac에서 Apple 메모를 만들고, 검색하고, 읽고, 편집하고, 옮기거나 삭제하도록 돕습니다.
apple-reminders
12k에이전트가 remindctl 도구를 사용해 Mac의 Apple 미리 알림과 미리 알림 목록을 보고, 만들고, 수정하고, 완료하거나 삭제하도록 돕습니다.
document-to-action-items
12k에이전트가 문서, 회의 녹취록 또는 메모 묶음을 작업, 담당자, 마감일, 결정 사항이 정리된 명확한 표로 바꾸도록 돕습니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.