/debug command activates systematic debugging mode for investigating issues, errors, or unexpected behavior. It applies the systematic-debugging skill to methodically identify and fix problems.
When to use this
Bug reports
Something isn’t working as expected
Error messages
You’re seeing errors and need to understand why
Unexpected behavior
The application behaves differently than intended
Performance issues
Slowness or performance degradation
How it works
The debugging workflow follows a systematic 4-phase approach:Gather information
- Error message and stack trace
- Reproduction steps
- Expected vs actual behavior
- Recent changes
Output format
You’ll receive a detailed debugging report:1. Symptom
What’s happening (the observable problem)2. Information Gathered
- Error:
[error message] - File:
[filepath] - Line: [line number]
3. Hypotheses
- ❓ Most likely cause
- ❓ Second possibility
- ❓ Less likely cause
4. Investigation
Testing hypothesis 1: [What was checked] → [Result]5. Root Cause
🎯 Explanation of why this happened6. Fix
Before/after code comparison with the solution7. Prevention
🛡️ How to prevent this in the future (tests, validation, etc.)Usage examples
Key principles
Ask before assuming: The debugger will gather full context before making guesses.
Test hypotheses: Uses systematic elimination rather than random guessing.
Explain why: Focuses on understanding the root cause, not just fixing symptoms.
Prevent recurrence: Adds tests and validation to prevent the bug from returning.
Related agents
- Debugger agent - Specialized in root cause analysis
- Test Engineer - Creates prevention tests
