An underrated technique that helps me debug something if I'm in the weeds. 

Write a TODO comment as if you were going to stop working on it now and explain to (future) self what you would need to know to restart the work.

Helps to really clarify the problem.