How do programmers work 9-to-5 (or longer) sitting behind a computer without getting health issues?
(self.no_stupid_questions)
I tend to stop physically, not mentally. As I'm breaking eye contact and stretching, I'm mulling about which way to implement something or what to try next to get to the bottom of a heisenbug.
For longer breaks, I tend to time those at a dip between two tasks so my brain doesn't have to pick up as much from where I left off. If you have trouble with that, it might help to mentally break down your work into parts before even starting it. Make a sort of mental roadmap/agenda. Helps identify good break points and helps you get back on track more easily.