The advice about "chunking" when writing new code does not apply when, like the cartoon character, you are
debugging, perhaps post-facto, an event in a complex system where you must recreate the state while considering multiple hypotheses. You are constructing and exploring a fault-graph, formulating various 'experiments' you can try next to prune (or expand) the graph, weighing the relative costs/benefits of each next action, and assessing your confidence in multiple beliefs. All this with imperfect information (e.g. as the cartoon shows, missing course code; but also empty commit messages, obscure or obsolete comments.
The most useful 'chunking' I do is to actually write down the multiple hypotheses and evidence pro-and-con. Often the mere act of putting the idea into words helps, and at least it gives me something to come back to when I get interrupted.