Schroedingers Bug
ELI5 — The Vibe Check
A Schrodinger's bug is a bug that disappears when you try to observe it. Add a console.log to debug it? Gone. Open the debugger? Works perfectly. Remove the logging? Broken again. The bug exists in a quantum superposition of 'broken' and 'working' and collapses to 'working' the moment anyone's watching. Usually caused by timing issues, race conditions, or the universe having a sense of humor.
Real Talk
A Schrodinger's bug (or heisenbug variant) is a defect that changes behavior when debugging tools are introduced, typically due to timing-sensitive issues. Adding logging or breakpoints changes execution timing, masking race conditions, concurrency bugs, or optimization-dependent behavior. These are among the hardest bugs to diagnose and often require careful reasoning rather than direct observation.
When You'll Hear This
"It's a Schrodinger's bug — works perfectly in the debugger, crashes in production." / "The console.log fixed it because it changed the timing. That's not a fix, that's a Schrodinger's bug."
Related Terms
Concurrency
Concurrency is juggling multiple tasks at once — not necessarily at the exact same instant, but switching between them fast enough that they all seem to be...
Debug
Debugging is the process of finding and fixing the gremlins in your code. Something is broken, and you need to play detective — adding clues (console.
Heisenbug
A bug that disappears when you try to find it. Named after Heisenberg's uncertainty principle — the act of observing (debugging) changes the behavior.
Race Condition
A race condition is when two parts of your code are racing to do something at the same time and the winner isn't guaranteed — leading to unexpected, hard-t...
Rubber Duck Debugging
You've been staring at this bug for 3 hours.