Skip to content

Found a bug? Here’s how to fix it without losing your mind.

Quick summary:

  • Search online for known errors
  • Use console.log to check your variables
  • Read the docs
  • Ask a senior dev only when you’ve tried everything else

Here’s what each step looks like in practice:

  • Got an error message? Search for it online. Your problem might be unique, so use Google’s search syntax to filter results and find relevant answers faster.
  • No error message? Use console.log (or your language’s equivalent) to print variables and check the state of your data at different points in the code.
  • Not a data issue? Comment out lines of code one by one to find where things break. Then use console.log to dig deeper.
  • Check the docs for the plugin, package, or language you’re using. Compare your code to the official examples.
  • Docs not helping? Collect your code, error messages, and what you’ve already tried, then contact the developer or publisher directly.
  • Stuck? Walk through the problem in your head from the start. Sometimes just thinking it through out loud (or in silence) is enough to spot the issue.
  • Still stuck? Bring the issue to a senior dev. Come prepared with: the error, what you expected to happen, what actually happened, what you’ve tried, and any relevant links.

Credit to this Reddit post for inspiring this list.