I often find I spend 20 minutes trying to formulate a good SO question, only to discover the solution just before pressing submit.
Further reading: https://en.wikipedia.org/wiki/Rubber_duck_debugging
Further reading: https://en.wikipedia.org/wiki/Rubber_duck_debugging
It's not always that however. Most recently I spent 4 hours debugging socket.io disconnecting before I remembered nefarious DPI/crawling done by the house ISP https://nodpi.org/2010/08/07/talktalk-becomes-stalkstalk/