debug
Systematic approach to debugging.
Process
- Reproduce the bug consistently
- Read the error message carefully
- Check recent changes
- Add logging at key points
- Isolate the issue
- Write a test that reproduces the bug
- Fix and verify
Common sources
- Null/undefined references
- Async timing issues
- Type mismatches
- Off-by-one errors
- State mutation bugs