Sign up ×

Is there some kind of generalization to the effect called Heisenbug? Because I would like to describe in my documentation how instrumenting a program changes the execution no matter what.

In The New Hacker's Dictionary it is defined as following:

heisenbug /hi:'zen-buhg/ /n./ [from Heisenberg's Uncertainty Principle in quantum physics]


Actually this is a general problem, when trying to observe the programs state by instrumentatation (tracing, debugging, etc.) the program execution is changed no matter what. But the definition for Heisenbug clearly says, it is a bug which is masked due to debugging and which disappears. What about bugs, which appear due to debugging - there is no word for that.

Is there some kind of generalization, like Heisenbug principle?

share|improve this question
Are you familiar with the Heisen_berg_ uncertainty principle? – user1249 Jul 16 '11 at 11:17
Yes, Heisenbug is defined on behalf of this definition. You are right, actually this one can be used as generalization. It just seems wrong to use a term from physics. – platzhirsch Jul 16 '11 at 11:28
What problem are you trying to solve here? If there's not a specific problem then the question is not constructive. – ChrisF Jul 16 '11 at 14:55
I've added the problem I want to solve to my original question. I need the term distinction for documentation purposes. – platzhirsch Jul 16 '11 at 15:59
If you need it for debugging, how about "this bug only appears when debugging"? Coin a term if you like, but that's overcomplicating it. – doppelgreener Jul 17 '11 at 0:50

2 Answers 2

up vote 2 down vote accepted

The term Heisenbug is already a generalization - of some special kinds of bugs which are mentioned in the cited article. The opposite case where an error only occurs during debugging and disappears in normal operation could also be considered a Heisenbug, if we define:

  • A software contains a Heisenbug iff the software produces different results in normal operation and during debugging and one of these results is unintended.
share|improve this answer


That's an 'artifact'.

(Example: I was debugging some code containing a (known-good) iterator using Microsoft VC++, and I defined in the Watch window n =, which then caused the iterator to go empty and start throwing weird exceptions. What I didn't realize was that the Watch code was not intelligently called only when I needed to inspect the value, but every debug step, and it didn't cache values and pass them through to the program, so it was depleting my iterator at double-speed.)

>Is there some kind of generalization, like Heisenbug principle?

Not that I'm aware of. Non-determinism, artifacts, sensitivity to external conditions describe this general behavior.

You might like to retitle your question Terminology question: Generalize Heisenbug

share|improve this answer

Your Answer


