node-inspect-debugger
यह क्या करती है
यह स्किल एजेंट को बिल्ट-इन debugger और संबंधित टूल से Node.js प्रोग्राम में बग ढूँढना सिखाती है। यह उन डेवलपर्स के लिए है जो प्रोग्राम अटकने, flaky tests या मेमोरी समस्याओं जैसी मुश्किल समस्याओं से जूझ रहे हैं।
कब इस्तेमाल करें
- ✓जब Node.js प्रोग्राम अटकता है या अजीब व्यवहार करता है और कारण साफ़ नहीं है।
- ✓जब कोई test कभी पास और कभी फ़ेल होता है और आपको ठीक उस बिंदु पर रुकना है जहाँ वह विफल होता है।
- ✓जब आपको Node.js ऐप में धीमे या लीक होते हिस्से के लिए मेमोरी snapshot या CPU profile चाहिए।
Skill का लिंक
https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/ekko-agent/skills/node-inspect-debugger/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी Node.js स्क्रिप्ट कभी-कभी अटक जाती है। मुझे सही लाइन पर रोककर कारण ढूँढने में मदद कीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट Node के बिल्ट-इन inspector से प्रोग्राम शुरू करता है, breakpoints सेट करता है और हर रुकने पर मान जाँचता है। स्क्रिप्ट वाली जाँचों के लिए वह स्थानीय पोर्ट से inspector से जुड़ भी सकता है।
तकनीकी सामग्री (मूल 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.
अक्सर पूछे जाने वाले सवाल
क्या debugger को नेटवर्क पर खुला छोड़ना सुरक्षित है?
स्किल सुझाती है कि inspector को 127.0.0.1 से बाँधें और उसे सभी नेटवर्क पतों पर खुला न छोड़ें।
क्या यह TypeScript के साथ काम करता है?
हाँ। source maps के साथ breakpoints TypeScript सोर्स पर जा सकते हैं।
क्या यह child processes को डिबग कर सकता है?
हाँ, लेकिन हर प्रोसेस को अपना अलग पोर्ट चाहिए।
जानकारी
लेखक का मूल विवरण
Debug Node.js with node inspect, inspector attach, breakpoints, Chrome DevTools Protocol, heap snapshots, and CPU profiles.
repo: EKKOLearnAI/ekko-studio
लोकप्रियता
- GitHub स्टार
- 12k
- रैंकिंग में स्थान
- #11570
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
1password
12kयह आपके एजेंट को 1Password CLI से कमांड और कॉन्फ़िग फ़ाइलों के लिए सीक्रेट लेने में मदद करती है, बिना उन्हें चैट, लॉग या सेव फ़ाइलों में दिखाए।
apple-notes
12kयह आपके एजेंट को Mac पर memo कमांड लाइन टूल से Apple Notes बनाने, खोजने, पढ़ने, बदलने, ले जाने या मिटाने में मदद करती है।
apple-reminders
12kयह आपके एजेंट को Mac पर remindctl टूल से Apple Reminders और रिमाइंडर लिस्ट देखने, बनाने, बदलने, पूरा करने या मिटाने में मदद करती है।
document-to-action-items
12kयह आपके एजेंट को दस्तावेज़, मीटिंग ट्रांस्क्रिप्ट या नोट्स से कार्यों, ज़िम्मेदारों, समय-सीमाओं और फ़ैसलों की साफ़ तालिका बनाने में मदद करती है।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।