---
description: Debug error — trace, fix, verify solusi
---

# Debug

## Steps

// turbo-all

1. **Identify Error**
   Check terminal output, file content, or ask Ketua:
   ```
   Read last terminal output
   Check active document for errors
   grep_search for error patterns
   ```

2. **Trace Root Cause**
   - Read the error message carefully
   - Find the file and line number
   - Read surrounding code context
   - Check imports and dependencies

3. **Research Fix**
   If unfamiliar error:
   - `search_web` for the exact error message
   - Check official docs
   - Check GitHub issues

4. **Apply Fix**
   Edit the code with the fix.
   Be surgical — change only what's needed.

5. **Verify**
   Re-run the code/test:
   - Check error is gone
   - Check no new errors introduced
   - Run related tests if any

6. **Report**
   Quick summary to Ketua: what was wrong, what was fixed, why.
