Skip to content

How to fix a bug?

Posted on:January 31, 2020 at 12:00 PM
  1. Understand how to reproduce the error, use a debugger if necessary.
  2. Identify the immediate line of code where the bug occurs.
  3. Search for the error message.
  4. Use the process of elimination.
  5. Log everything and analyze the logs.
  6. Eliminate the hardware or platform as a cause.
  7. Look at the correlations.
  8. Use version control history, go back to last functional version.
  9. Ask for help, get a second pair of eyes, explain the problem out loud.
  10. Take a break, have a walk or go to sleep.

Sources

http://www.yacoset.com/Home/how-to-fix-bugs-step-by-step
https://betterprogramming.pub/how-to-fix-bugs-b3ae3044bc78
https://michaelscodingspot.com/10-tips-gain-mastery-fixing-bugs