首页龙虾技能列表 › Debug Pro — 调试专家

Debug Pro — 调试专家

v1.0.0

专业调试辅助工具,提供代码调试策略、错误分析和问题排查指导。

39· 16,700·167 当前·176 累计
by @cmanfre7·MIT-0
下载技能包
License
MIT-0
最后更新
2026/2/26
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill is an instruction-only debugging guide whose requirements and actions align with its stated purpose and request no extra credentials or installs.
评估建议
This skill is a coherent debugging reference and does not request credentials or install code. Things to consider before installing: the commands it recommends (ps, lsof, netstat, top, df, curl, dig, git bisect, etc.) access and may display sensitive process, connection, or filesystem information — avoid running them on systems containing secrets or data you don't want exposed. git bisect will check out intermediate commits (use git bisect reset afterwards). Because the skill is instruction-only...
详细分析 ▾
用途与能力
Name and (implicit) purpose — systematic debugging help and language-specific commands — match the SKILL.md content. There are no unrelated environment variables, binaries, or installs requested.
指令范围
The instructions include system-level diagnostic commands (lsof, netstat, ps, top, df, etc.) and git bisect which will inspect or temporarily change repository state; this is coherent for a debugging guide but these commands can reveal process, network, and filesystem information. The SKILL.md does not instruct reading unrelated user files or environment variables beyond what these commands expose.
安装机制
No install spec and no code files — instruction-only. Nothing is written to disk by the skill package itself.
凭证需求
The skill requests no environment variables, credentials, or config paths. That is proportionate to its stated purpose.
持久化与权限
always is false and the skill does not request persistent or privileged installation. It does not modify other skills or system-wide agent settings.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/1/29

debug-pro 1.0.0 initial release: - Introduces a detailed 7-step debugging protocol for systematic problem-solving. - Provides quick-reference debugging commands for JavaScript/TypeScript, Python, Swift, CSS/layout, network tools, and git bisect. - Includes a table of common error messages, their likely causes, and quick fixes. - Lists frequently used diagnostic shell commands for system and application troubleshooting.

● 无害

安装命令 点击复制

官方npx clawhub@latest install debug-pro
镜像加速npx clawhub@latest install debug-pro --registry https://cn.clawhub-mirror.com

技能文档

Systematic debugging methodology and language-specific debugging commands.

The 7-Step Debugging Protocol

  • Reproduce — Get it to fail consistently. Document exact steps, inputs, and environment.
  • Isolate — Narrow scope. Comment out code, use binary search, check recent commits with git bisect.
  • Hypothesize — Form a specific, testable theory about the root cause.
  • Instrument — Add targeted logging, breakpoints, or assertions.
  • Verify — Confirm root cause. If hypothesis was wrong, return to step 3.
  • Fix — Apply the minimal correct fix. Resist the urge to refactor while debugging.
  • Regression Test — Write a test that catches this bug. Verify it passes.

Language-Specific Debugging

JavaScript / TypeScript

# Node.js debugger
node --inspect-brk app.js
# Chrome DevTools: chrome://inspect

# Console debugging console.log(JSON.stringify(obj, null, 2)) console.trace('Call stack here') console.time('perf'); / code / console.timeEnd('perf')

# Memory leaks node --expose-gc --max-old-space-size=4096 app.js

Python

# Built-in debugger
python -m pdb script.py

# Breakpoint in code breakpoint() # Python 3.7+

# Verbose tracing python -X tracemalloc script.py

# Profile python -m cProfile -s cumulative script.py

Swift

# LLDB debugging
lldb ./MyApp
(lldb) breakpoint set --name main
(lldb) run
(lldb) po myVariable

# Xcode: Product → Profile (Instruments)

CSS / Layout

/ Outline all elements /
 { outline: 1px solid red !important; }

/ Debug specific element */ .debug { background: rgba(255,0,0,0.1) !important; }

Network

# HTTP debugging
curl -v https://api.example.com/endpoint
curl -w "@curl-format.txt" -o /dev/null -s https://example.com

# DNS dig example.com nslookup example.com

# Ports lsof -i :3000 netstat -tlnp

Git Bisect

git bisect start
git bisect bad              # Current commit is broken
git bisect good abc1234     # Known good commit
# Git checks out middle commit — test it, then:
git bisect good  # or  git bisect bad
# Repeat until root cause commit is found
git bisect reset

Common Error Patterns

ErrorLikely CauseFix
Cannot read property of undefinedMissing null check or wrong data shapeAdd optional chaining (?.) or validate data
ENOENTFile/directory doesn't existCheck path, create directory, use existsSync
CORS errorBackend missing CORS headersAdd CORS middleware with correct origins
Module not foundMissing dependency or wrong import pathnpm install, check tsconfig paths
Hydration mismatch (React)Server/client render different HTMLEnsure consistent rendering, use useEffect for client-only
Segmentation faultMemory corruption, null pointerCheck array bounds, pointer validity
Connection refusedService not running on expected portCheck if service is up, verify port/host
Permission deniedFile/network permission issueCheck chmod, firewall, sudo

Quick Diagnostic Commands

# What's using this port?
lsof -i :PORT

# What's this process doing? ps aux | grep PROCESS

# Watch file changes fswatch -r ./src

# Disk space df -h

# System resource usage top -l 1 | head -10

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务