We don't get to choose when inspiration visits us. Many times, the solution to an agonizing problem comes when we are far away from it, displacing forceful thought for casual reflection. I know my best ideas sneaked in just like that.
I also know that if I'm facing an acute problem that jeopardizes my product (thus my business, thus my wellbeing) I drift to think of it even when I shouldn't. Such is life.
And no, spending more time solving the bug instead of attending social events isn't the cure either. You need to physically remove yourself from a problem if you want a fresh perspective. Go sleep, hang out, eat something, get back. There are very few problems that I haven't solved in a career full of challenges and this one will not be any different, I just need to respect the mechanics of coming up with a solution.
And no, spending more time solving the bug instead of attending social events isn't the cure either. You need to physically remove yourself from a problem if you want a fresh perspective. Go sleep, hang out, eat something, get back. There are very few problems that I haven't solved in a career full of challenges and this one will not be any different, I just need to respect the mechanics of coming up with a solution.