20 simple steps to debug anything

submited by
Style Pass
2021-05-27 11:00:06

Debugging is an everyday task. Your webpack build failed locally? Debug it. Your CI failed? Debug it. You wrote some code and broke everything? Debug it. Bob from the marketing team called you because you MUST fix a bug into production right now? Debug it.

Keep a cool head, it makes the hard bugs simple and the impossible ones possible. So, if you struggle, remove your hand from the keyboard. Take a breath, get a glass of water. And go back to your seat.

Even if you have to debug your production server. Stress causes mistakes, mistakes cause more bugs, more bugs cause more stress.

As features and edge cases grow it becomes impossible for one developer to keep all this complexity in their head. You should spend the time to check the defect you are seeing is outside the expectations of the application.

Don’t wait for the failure to reproduce by itself. Make it fail again as it was reported. If it was in production, don’t start by reproducing the failure locally: do it in production (unless it involves dropping your database). Don't focus on making your staging data look like the production environment, you'll waste time and be misled by the wrong bugs.

Leave a Comment