June 1, 2026
“Works on My Machine”: How I Reproduce Intermittent Bugs
Intermittent bugs are the worst kind: real enough to annoy users, invisible enough to waste a sprint. “Works on my machine” usually means…
Higor Mesquita
1 min read
Intermittent bugs are the worst kind: real enough to annoy users, invisible enough to waste a sprint. "Works on my machine" usually means we haven't found the conditions yet — not that the bug is fake.
Here's the process I use when a bug only shows up sometimes.
Step 1: Lock the variables
Before retesting, write down what you know and what you don't:
- Build version, environment, browser/OS, device
- User role, account state, feature flags
- Time of day, load, network (Wi‑Fi vs mobile)
- Exact steps — including pauses, tab switches, double clicks
If the reporter skipped any of this, ask once, clearly. Guessing spreads the "can't reproduce" loop.
Step 2: Reproduce the context, not just the clicks
Intermittent bugs often depend on state, not sequence alone.
Try to match:
- Same data (fresh user vs returning, empty cart vs full)
- Same session (logged in for hours vs just logged in)
- Same timing (fast clicks vs slow; action before page fully loads)
- Same parallel activity (two tabs, background sync, notification)
One run on a clean profile isn't enough. Run it on a "dirty" profile that mirrors real usage.
Step 3: Stress the weak spots
When the bug hides, I run short variation loops — same flow, one change at a time:
- Repeat the action 10–20 times
- Throttle network (Slow 3G)
- Switch apps or tabs mid-flow
- Refresh, go back, submit twice
- Run right after deploy or cache clear
Stop when something breaks or you've ruled out that variable.
Step 4: Capture evidence while it's happening
A bug you can't prove will get deprioritized.
Minimum capture:
- Screen recording
- Timestamp + environment
- Console/network logs if relevant
- "It failed on attempt 7 of 15" — that detail matters
If it passes 14 times and fails once, that's still a bug. Document the ratio.
Step 5: Narrow, then hand off cleanly
When you find a pattern, say it in one line:
"Fails ~30% of the time on slow network when user double-submits after session refresh."
That turns "intermittent" into something a dev can debug.
If you still can't reproduce after structured attempts, say honestly what you tried and what remains unknown. That's more useful than closing with "works for me."
What changed my hit rate
- Stop treating flaky repro as failure — document attempts
- Match real user state, not only the happy path
- One variable per loop — otherwise you won't know what fixed it
- Pair with a dev early on the worst ones — live repro beats a third ticket comment
Intermittent bugs aren't magic. They're conditional. Find the condition.
What's the trick that's helped you most with "works on my machine"? Share it below.