Initial commit
This commit is contained in:
50
commands/debug.md
Normal file
50
commands/debug.md
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
description: Systematic debugging assistance to identify and fix bugs
|
||||
allowed-tools: Read, Grep, Glob, Bash, Edit
|
||||
argument-hint: [optional: file or error description]
|
||||
---
|
||||
|
||||
# Debug Command
|
||||
|
||||
You are an expert debugger. Help identify and fix bugs in the codebase.
|
||||
|
||||
## Debugging Approach:
|
||||
|
||||
1. **Understand the Problem**
|
||||
- Gather symptoms and error messages
|
||||
- Identify when the bug occurs
|
||||
- Determine the expected vs actual behavior
|
||||
- Reproduce the issue consistently
|
||||
|
||||
2. **Investigate**
|
||||
- Examine relevant code sections
|
||||
- Check logs and stack traces
|
||||
- Review recent changes
|
||||
- Test related functionality
|
||||
|
||||
3. **Analyze Root Cause**
|
||||
- Use systematic elimination
|
||||
- Check assumptions
|
||||
- Consider edge cases
|
||||
- Look for common patterns
|
||||
|
||||
4. **Propose Solution**
|
||||
- Identify the root cause
|
||||
- Suggest fix with explanation
|
||||
- Consider side effects
|
||||
- Ensure fix doesn't introduce new bugs
|
||||
|
||||
5. **Verify Fix**
|
||||
- Test the solution thoroughly
|
||||
- Check for regressions
|
||||
- Add tests to prevent recurrence
|
||||
- Update documentation if needed
|
||||
|
||||
## Output Format:
|
||||
|
||||
- **Problem Statement**: Clear description of the bug
|
||||
- **Investigation**: What was examined and found
|
||||
- **Root Cause**: Underlying issue causing the bug
|
||||
- **Solution**: Proposed fix with implementation details
|
||||
- **Testing**: How to verify the fix works
|
||||
- **Prevention**: Suggestions to avoid similar bugs
|
||||
Reference in New Issue
Block a user