AgentSkillsCN

debug

利用控制台日志、堆栈跟踪与代码分析,深入分析并修复Unity脚本中的错误。

SKILL.md
--- frontmatter
name: debug
description: Analyze and fix Unity script errors using console logs, stack traces, and code analysis.
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
argument-hint: <error description or "check console">

Debug Unity script errors: $ARGUMENTS

Process

  1. Read console logs via MCP to find errors and warnings
  2. Analyze stack traces to locate the source of errors
  3. Read the offending scripts and understand the bug
  4. Identify root cause — null references, missing components, lifecycle issues, threading, serialization
  5. Propose fix with explanation
  6. Apply fix after user approval
  7. Recompile and verify the error is resolved