When I debug a problem I usually follow the steps described below:
- Focus on a given problem completely (avoid any distractions)
- Collect all evidence in a problem folder (I usually name the folder with a date and a problem title, eg. 20151101_deadlock-in-myapp) and create a text file with the problem description
- Prepare a hypothesis and write it down (keep in mind that the least probable hypothesis is usually the least probable :) - leave it for later)
- Test your hypothesis - while testing remember to write down the results you received in the text file
- If your hypothesis is wrong move back to point 3