When the user mentions "bug", "error", "not working", "broken", "crash", "fails", "issue", "problem", or asks why something doesn't work. Provides systematic debugging approaches.
Before diving in, gather context:
| Symptom | Likely Causes |
|---|---|
| Works locally, fails in prod | Env vars, paths, permissions, CORS |
| Intermittent failure | Race condition, caching, timing |
| Undefined/null error | Missing data, async timing, typo |
| Silent failure | Swallowed exception, wrong error handler |
| Performance degradation | N+1 queries, memory leak, missing index |
JavaScript/React:
console.log, console.table, debuggerReact Native:
adb logcat (Android), Console.app (iOS)Node.js:
--inspect flag + Chrome DevToolsDEBUG=* environment variablenode --trace-warningsDatabase:
When reporting findings: