Debugging is simulation, not typing
When you debug, you build a private model of cause and effect: which branch ran, which state was wrong, which assumption failed. The model lives in working memory. It is large, fragile, and almost never written down completely.
Typing a fix is the last step. Most of the clock is updating the model after each experiment.
An interruption does not pause the simulation. It deletes it.
The real cost curve
Generic "refocus takes X minutes" numbers get shared as if they were universal facts. We do not cite a single study here - and for debugging, the useful claim is narrower: recovery is not generic refocus. You must rebuild which test failed and with what seed, which breakpoint is still set, which log filter was applied, the last hypothesis you were about to disprove, and dirty local state you forgot to note.
GetToWork rule of thumb: a ninety-second question can erase a session that took much longer to load, even if you answer in ten words. Time one fragile-zone interrupt yourself if you need a personal estimate.
Know the fragile zone
You are in the expensive zone when: - You are stepping through code with a hypothesis - Flaky test behavior finally reproduced - Production issue with incomplete logs - Race or timing bug under observation - You have more than six tabs or buffers tied to one thread
In that zone, treat chat like a fire alarm, not a doorbell.
The sixty-second park still applies
You will be interrupted. Before you stand up, write next experiment in one line, failing assertion or request id, branch and dirty files, command to rerun the test.
The park protocol from working from home when interrupted is debugger insurance, not household-only advice.
Team norms that help
Tier-one channel for production down only.
Async by default for questions that can wait one overlap window.
Context in the first message: environment, repro, what you tried.
No "you got a sec?" without the question attached.
Leaders who ping for status during red-ticket work teach everyone to hide state. Status belongs in written updates (async status).
Pairing is not interruption if roles are clear
Driver/navigator pairing can preserve the model because both hold context. Random shoulder taps do not.
If you pull someone into debug, give them the ticket thread first. Let them read before you talk.
When to stop fighting and document
If interrupts won, switch modes. Spend fifteen minutes writing repro, logs, and next experiments in the ticket. You buy back parallelism: others can read while you handle the ping.
That is cheaper than pretending you still hold the full model.
On-call and fragile zones
During incidents, depth is mandatory and interrupts are constant. Reduce damage by assigning roles: one person holds the model, one handles comms, one gathers logs.
Without roles, everyone pings the debugger with partial facts and the model resets every two minutes.
Post a single incident thread. Questions go there, not side DMs.
Rubber duck before you ping someone else
Write the hypothesis and disproof you tried. Often the act of writing surfaces the bug without exporting your reset cost to a teammate.
When you do ping, send repro steps, not urgency adjectives.
Recovery when you already lost the model
Stop debugging for ten minutes. Write timeline, facts, and next experiments. Treat yourself as a new investigator.
Starting fresh with notes beats thrashing for an hour pretending you still remember branch state.
Metrics that lie
Lines of code and commit count rise when people switch often because each switch produces tiny commits and comment fixes. Watch reviewable outcomes instead.
If your team measures activity, debugging will look unproductive right when it is most valuable. Push back with ticket evidence, not hours at keyboard.
Ask for quiet windows during sev-1 only for the person holding the trace, the same way you would not pull a surgeon mid-incision for a status photo.
Example: ten-second question, twenty-minute rebuild
Example: Colleague asks "is feature X behind a flag?" while you hold twelve variables in a race condition. You answer, return, re-run, forget which goroutine you suspected.
Fix: "In flag check, back in 20 min unless prod fire" plus park note.
Meetings mid-debug
If a meeting lands during investigation, spend ninety seconds on a park note or pay the reopen tax when you return - usually long enough to feel expensive, short enough that people pretend it was free.
Different rules for different days
Debugging days need different rules than feature days. Do not force Pomodoro where reload cost dominates.
WIP limits for investigations
Cap open investigations like you cap open branches. One active debug thread reduces the cost of interrupts because you know where to return.
Starting a second investigation "while waiting" doubles reload tax when the first thread resumes.
Use a visible status during hard debug: investigating checkout 500s, back at 11:30. Status reduces random pings without requiring constant chat presence.
Team tiers during incident vs ordinary debug
Production incidents may justify interrupts; ordinary defect work deserves the same protection as feature work. Mixing the two teaches everyone to label everything urgent.
Agree labels in the tracker so on-call is not the only vocabulary for interruptible.
Context switching covers non-debug tasks. Deep work for developers covers block sizing.
Protecting debug time is not antisocial. It is how incidents end faster. The fix ships when the model survives long enough to change the code with evidence.
Argument: the asker pays too little attention to cost
Most interruptions are rational for the asker. They need an answer now. The debugger pays in model rebuild.
Teams that never name this asymmetry rely on heroes who answer anyway and burn out, or on grumps who refuse every ping and get labeled uncollaborative.
The middle path is norms: context in the first message, async default, visible status during fragile work, tier-one only for production down.
Scenario: flaky test finally reproduces
Example: You run the suite for the ninth time and see the race. Chat pings "quick question about unrelated API."
If you answer, you may never see the race again this week. If you post "holding trace until 12:00, tier-one only," you protect the expensive moment.
Leaders must enforce that posts are respected or the norm becomes fiction.
Scenario: handoff after interrupt won
Example: You lost the model. You spend twelve minutes writing: last known good commit, failing command, ruled-out causes, next two experiments.
You reply in chat: "Lost state, documented in ticket 551, picking up at 14:00." The team gets parallelism; you get an honest restart.
Parents and partners at home
Domestic interrupts during debug cost the same as workplace pings. Protect focus at home plus a visible "debug until X" sign reduces collisions without pretending family is less important than coworkers.
Instrument the week without fiction
Track one metric privately: number of debug sessions longer than thirty minutes that ended with a ticket update versus ended with a chat answer only.
If chat answers dominate, your team is buying short-term harmony with long-term incident duration. Shift questions into the ticket thread so answers become durable.
Code review during active debug
Review requests are interrupts with good intentions. Batch them outside fragile windows or expect debug tax on both sides. Reviewers who need answers immediately should read the ticket first; authors who need depth should say when they will return to chat.
Sleep and fragile models
Debugging late at night with a fragile model is high risk: you lose state and make sloppy fixes. If the park note is solid, stopping and restarting fresh may beat hero hours.
The incident can wait for a rested model when the ticket documents repro and next experiments clearly.
Teach new hires the park note before you teach them the debugger shortcuts. Shortcuts without parks scale interrupt damage across the team.
One team norm worth writing down: no status pings to the person assigned a sev-2 investigation unless the incident thread is updated first.
That single rule saves more model rebuilds than most tooling purchases.