- 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.