帮助你用 node inspect 与性能分析工具定位 Node.js 调试与性能问题。
该技能材料本质上是用于 Node.js 调试的提示/文档型内容,未声明需要密钥,也未声明连接外部远程服务。结合其开源 GitHub 来源与极高社区采用度,整体风险较低,但其文档会引导用户使用本地调试器、Inspector 端口和安装额外调试依赖,使用时仍应注意仅在受控环境操作。
材料明确标注“无”密钥/环境变量,README 也未要求 API token、云凭证或账户授权;未见明显的凭证收集、存储或滥用路径。
未声明任何远程主机;文档提到的访问主要是本机 Inspector 端口如 127.0.0.1:9229,以及本地调试场景,并明确提醒不要暴露到 0.0.0.0。未见将用户数据外发到第三方服务的描述。
系统检查项表明其为 prompt-only;材料内容虽然包含 node inspect、kill -SIGUSR1、npm 安装调试库等命令示例,但这些是文档指导而非技能自身自动执行能力。未见该技能本体申请额外系统执行权限。
材料未声明直接读写用户文件或持久化数据的内建能力;示例仅涉及调试时可能生成本地 profile/heap 文件到 /tmp,此属于用户手动执行的本地调试输出,不构成技能本身的过度数据访问。
来源为 GitHub 开源仓库,且社区采用度极高(约 37.7 万 star),可审计性和来源可信度较强,明显降低供应链风险。需留意的是许可证未声明、维护状态未知,但基于现有事实不足以升为更高风险。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "node-inspect-debugger" 技能: 1. 下载 https://raw.githubusercontent.com/openclaw/openclaw/main/skills/node-inspect-debugger/SKILL.md 2. 保存为 ~/.claude/skills/node-inspect-debugger/SKILL.md 3. 装好后重载技能,告诉我可以用了
请教我如何用 node inspect 和 --inspect 调试一个 Node.js 服务。说明如何启动调试、设置断点、单步执行、查看调用栈,并给出常见命令示例。
一份可操作的 Node.js 调试步骤说明,包含启动方式、断点命令和调用栈查看方法。
我怀疑 Node.js 应用存在内存泄漏,请说明如何通过 Chrome DevTools Protocol 或 --inspect 连接调试器,抓取 heap snapshot,并分析可疑对象增长。
一套定位内存泄漏的方法,包括连接调试器、导出堆快照和识别异常对象的步骤。
请告诉我如何给 Node.js 程序采集 CPU profile,查看热点函数,并根据 profile 结果优化性能。请附上命令和分析思路。
一份 CPU 性能分析指南,涵盖 profile 采集、热点定位与优化建议。
Use for Node.js debugging that needs inspector access: hidden locals, async hangs, flaky tests, child processes, startup races, memory growth, or CPU hot paths.
Default to node inspect first. Use Chrome DevTools Protocol only when you need scripted breakpoints, automated state capture, heap snapshots, or CPU profiles.
Quick start
node inspect path/to/script.jsnode --inspect-brk --import tsx path/to/script.tskill -SIGUSR1 <pid> then node inspect -p <pid>curl -s http://127.0.0.1:9229/json/list | jqnode --inspect-brk openclaw.mjs ...OPENCLAW_VITEST_MAX_WORKERS=1 node --inspect-brk scripts/run-vitest.mjs <file>Debugger REPL
cont, next, step, out, pausesb('file.js', 42), sb(42), sb('functionName'), breakpoints, cb('file.js', 42)bt, list(8), watch('expr'), exec exprrepl, then evaluate locals directly; Ctrl+C exits repl mode.cont before quitting if the process should continue; otherwise kill.OpenClaw tips
127.0.0.1 inspector binds. Do not expose --inspect=0.0.0.0 unless the network is isolated.--enable-source-maps when useful; node inspect can still show emitted paths.NODE_OPTIONS=--inspect-brk can propagate the inspector, but each child needs its own port./json/list.Programmatic CDP
Install tooling outside the repo unless the project already depends on it:
mkdir -p /tmp/cdp-tools
npm --prefix /tmp/cdp-tools i 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
Profiler, start, wait, stop, write /tmp/profile.cpuprofile, open in Chrome DevTools.HeapProfiler, collect addHeapSnapshotChunk, call takeHeapSnapshot, write /tmp/heap.heapsnapshot.Pitfalls
--inspect does not pause; use --inspect-brk when setup must happen before code runs.9229; use --inspect=0 or a unique port for parallel targets.帮助你创建、整理、校验并重构 AgentSkills 与 SKILL.md 技能文件。
为 OpenClaw 代理创建的 GitHub PR 或议题自动添加脱敏执行记录。
帮助用户进行网页搜索、内容提取与研究资料整理,快速获取可靠信息。
快速搭建一次性原型,验证方案可行性并给出对比结论。
帮助用户编写、理解与调试 Lobster 编程语言代码。
帮助用户管理飞书云空间中的文件、文件夹与存储内容。
帮助 AI 代理调试 Node.js 代码,支持断点、单步执行与变量检查。
帮助用户通过 V8 Inspector 调试 Node.js 程序,设置断点并检查变量。
帮助你用 pdb、breakpoint 和 debugpy 高效调试 Python 问题
通过命令行连接 VS Code 调试器,帮助 AI 管理断点、单步执行并排查代码问题。
支持多语言断点调试、单步执行与堆栈追踪,帮助快速定位和修复代码问题。
让 AI 代理在 VS Code 中查看调试状态、控制执行并设置断点。