Debugging Skill
Objective
Find the actual cause of a problem rather than treating symptoms.
Process
- Reproduce the problem.
- Capture the complete error or unexpected behavior.
- Identify the failing layer.
- Inspect relevant source code and configuration.
- Trace the execution path.
- Form a specific hypothesis.
- Make the smallest useful change.
- Reproduce the original failure.
- Verify the fix.
- Check for regressions.
Rules
Never repeatedly execute a failing command without learning something new.
Never suppress an error simply to make a command succeed.
Never remove functionality merely to eliminate an error.
Do not assume the first error-looking message is the root cause.
Distinguish between:
- Root cause
- Contributing factor
- Secondary symptom
Evidence
Use:
- Error messages
- Logs
- Stack traces
- Source code
- Configuration
- Runtime state
- Dependency versions
- Reproduction steps
Regression Check
After fixing a problem:
- Re-run the original failing operation.
- Run relevant tests.
- Check related functionality.
- Inspect the final diff.
Completion
A bug is not considered fixed until the original failure has been reproduced successfully after the change or equivalent evidence demonstrates the behavior is resolved.