Heisenbug
Updated 2026-07-30
Summary
In computer programming jargon, a heisenbug is a software bug that seems to disappear or alter its behavior when one attempts to study it. The term is a pun on the name of Werner Heisenberg, the physicist who first introduced the uncertainty principle, and it is a reference to the observer effect, w…
Definition
A bug that disappears or changes its behavior when you try to study (debug) it. This often occurs because debugging mode alters memory layout or timing. Scaffold use: - Uncertainty management: There are also Heisenbugs in management—when you watch employees work, they perform perfectly; as soon as you leave, problems arise. This shows that monitoring mechanisms interfere with real performance.
Introduction
How to use
- Uncertainty management: There are also Heisenbugs in management—when you watch employees work, they perform perfectly; as soon as you leave, problems arise. This shows that monitoring mechanisms interfere with real performance.
Mechanism
Heisenbug: A bug that changes behavior or disappears when debugging, adding logs, or observing, often due to race conditions, uninitialized memory, timing, or optimization differences—observation itself changes the observed object, named after Heisenberg's uncertainty principle.
Practice
In progress 0/4Practice this model in one real situation:
Cases
- Race condition disappears after adding print statements; debug build works fine but release build crashes.
Common pitfalls
- Thinking 'adding logs will fix it'; treating intermittent issues as unrelated; ignoring non-deterministic root causes.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Heisenbugverified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS