MY DEBUG CHECKLIST
In the spirit of Atul Gawade’s The Checklist Manifesto, here’s some things I review when I get stuck coding.
“Make it a habit to examine error messages when something goes wrong. Avoid debugging by gut feel or trial and error.”
“The first step when you are debugging your code is to write a new test pinpointing the bug.“
- code from error message + Stack Overflow
- checkout develop branch or previous working commit
- double check README
- rebuild code
- reclone repo
- environment variables?
- logs (timely? accurate? what’s missed?)
- anything left in environment from previous branch (db migration, dependencies)?
- command run from right dir?
- state: when is it being updated? all at once?
- any processes already on port?
lsof -i :<port>
- client version? server version?
- potential conflicts between deps (or deps deps) and something else on your machine?
- what do you actually know?