If you are stuck debugging something, one of the best techniques at your disposal is walking away. I have, unfortunately, relearned this lesson with alarming frequency. Instead of brewing another pot of coffee, at the end of your day:
- Write down, on a notebook or in a text file, everything you know about the problem so far.
- Write down the next thing you are going to try.
- Don’t work on the problem until tomorrow.
Your subconscious is a better debugger than you are. Give him or her the information they need, and let them work.