| name | debug |
| description | Debug an error or unexpected behavior |
| allowed_tools | ["Bash","Read","Glob","Grep"] |
| args | ["description"] |
| user_invocable | true |
Debug the following issue: {description}
Follow these steps:
- Understand the error:
- Parse any error messages or stack traces
- Identify the file(s) and line number(s) involved
- Read the relevant source files.
- Search for related code patterns using Grep.
- Identify the root cause:
- Check for common issues (typos, wrong variable names, missing imports)
- Trace the data flow
- Check edge cases
- Propose a fix with explanation.
- If you can fix it, apply the change using Edit.
- Run any related tests to verify the fix.