- Understand how to reproduce the error, use a debugger if necessary.
- Identify the immediate line of code where the bug occurs.
- Search for the error message.
- Use the process of elimination.
- Log everything and analyze the logs.
- Eliminate the hardware or platform as a cause.
- Look at the correlations.
- Use version control history, go back to last functional version.
- Ask for help, get a second pair of eyes, explain the problem out loud.
- 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