How to Debug Anything

Michael Ojogbo
2 min readNov 7, 2023

--

De​bug /(ˈ)dē-ˈbəg/ — to remove mistakes from.

5 steps to take to solve any coding problem (maximize one’s chances of solving any coding problem)

  1. Tinker and experiment — try doing things you think might work, maybe try doing print statements.
  2. Check the documentation — Not all tools have good documentation but taking some time to explore documentation can be a quick way to find your answer. You’ll want to learn how to search a webpage with command + F or control + F, that way you can search for specific keywords on a page.
  3. Doing web search — At the end of the day good software engineers are secretly just professional Googlers, and this is one of the most powerful tools, being able to search the web for somebody else who’s has already run into the problem that you’ve just run into, and then solved it.
  4. Ask Questions on Forums & Q&A Sites.
  5. Join & Strengthen the Community and Tool.

By asking questions you promise that at some point, you will go back and help other people learn as well 🤝

Helping out with questions help you learn better/more about the tool 💡

Where to ask questions:

  • Indexed code-based forum (ex. Stack overflow )
  • Indexed repository (ex. GitHub)
  • Indexed technology-specific forum (ex. Slash eat dev)
  • Unindexed discussion platform (ex. Chainlink discord, Twitter)

Index — forums that web crawlers have gone through and stuck them in their database or indexed them. For their search-ability and discoverability.

When asking questions you should put them in a clear format where its convenient for people to help you as they are doing so out of the goodness of their heart.

How to format your questions:

  1. Search about problem.
  2. Make a title.
  3. Introduce the problem first.
  4. Add minimalistic code(the section where the error is).
  5. Learning markdown to format your code(use backticks). Using these (```)three back ticks and labeling of the language is a critical piece of formatting your code and will drastically improve on the number of people who answer your questions. Any error or code should be formatted with this three backtick syntax.
  6. Use tags — people who care about certain technologies, monitor specific tags and questions being asked about the technologies that they like.
  7. Read forum rules.

This will help debug most problems except in the science field I think, so this is how you’d go about “debugging” with a Scientific method.

  • Observation/ question
  • Research topic area
  • Hypothesis
  • Test with experiment
  • Analyze data
  • Report conclusions

--

--

Michael Ojogbo

I'm a passionate software developer and product designer who loves crafting products that enhance peoples lives.