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.
Take a break. Your subconscious can be a better debugger than you are. Give it the information it needs, and let it get to work.