返回 Skill 列表
extension
分类: 开发与工程无需 API Key

debug-code

通过分析错误、跟踪执行流程、确定根本原因并提出修复建议来调试代码问题。当用户说“这不起作用”,“我遇到了一个错误”,“为什么这个坏了?”,或者粘贴错误信息时使用。

person作者: jakexiaohubgithub

When debugging code:

  1. Understand the symptom: What error message or unexpected behavior is occurring?
  2. Read the relevant code: Trace the execution path from entry point to the failure
  3. Identify the root cause: Pinpoint the exact line(s) causing the problem
  4. Draw a diagram: Use ASCII art to show what's happening vs what should happen
  5. Provide the fix: Show the corrected code
  6. Explain why: Teach the user what went wrong so they learn from it
  7. Check for related issues: Look for similar patterns elsewhere in the codebase that might have the same bug