After 5PM stop looking for a fix, start looking for a stopping point and write up some notes to review when you’re fresh again.
Hot Take Incomming...
No. My best successes were when I stayed on point and pushed through the fatigue and solved the problem. Taking a 'go to bed and come back to the office fresh' type of break would inevitably set me back, as I would have to pick up my train of thought again, to get back "into the zone" of the problem and solving it. Its another form of an interruption while you are trying to concentrate, and can interrupt an 'Eureka!' moment in problem solving.
It truly sucks having to work the extra hours, and if the project management is so bad that you're doing it all the time, then you need to find other work, but sometimes, 'sticking it out' is the solution to the problem, finishing what you started.
Having said that, if I've pushed through the fatigue multiple times in multiple hours, so that its super hard to push again, THEN that would be the point where I walk away from the problem for the evening. Its not an either/or thing, but its definately stick around and try to solve longer than the advice I'm replying to would suggest.
One last thing. The above advice was given by someone who spent most of their career self-employeed and working an hourly rate. You're expected to solve the problems others can't because you're getting paid more, and your time is compensated accordingly to the amount of work you are putting in. If you are a salaried employee, especially one who is low paid, I would then advise you to consider other things than strict professionalism, like QoL issues vs compensation gained, etc.
Not sure why this is being downvoted. My main takeaway is just that while taking a break works for a lot of people a lot of the time, for this person sometimes it doesn't.
People are different and sometimes if you are new to something, it's helpful to see both the popular advice (take a break) and that it might not always work for some people (this poster).
At 11:00 in the evening, there are two options for what they're dealing with. Either:
They have made precisely no headway whatsoever in actually solving the bug, or
They have fixed the bug, but the debugging made them go "---wait, how did that ever work in the first place?!"
If it's #1, odds are pretty good that there's a random debug step they put in at 9:08 in the morning that's screwing everything up now. If it's #2, odds are pretty good that it actually didn't work before, and now they've got to go back through the last six months of data and rectify it to fix that bug.
I don't code, but I do work with a lot of really shitty proprietary software. The amount of time vendors haven't been able to fix their own shit is so high. Spent 6 hours on the phone once. Work 2.5 hours overtime for that call.
In that case though, the person helping you doesn't have the ability to solve the problem by changing code. They have to work around the bug to try to make it work for you in its broken state and report the problem to developers to fix in the next release. It's a more difficult problem to solve
That's me right now. Just recently sent an issue report to Proton over the fact I have not been able to connect to their servers on my Linux running laptop for almost a week at this point and have given up on trying to self-disgnose and fix it on my own using what little skills I have and whatever information I could find through web searches. The worst part is how it effortlessly works perfectly on my desktop running windows 10.