3 ms·
Step debuggers don't "create Heisenbugs", you're just much more likely to notice race conditions while step debugging than print debugging. If anything, print d
by not_kurt_godel 2mo ago
Step debuggers don't "create Heisenbugs", you're just much more likely to notice race conditions while step debugging than print debugging. If anything, print debugging creates more bugs because you're altering the code you're trying to test by definition.
- tstrimple 1mo agoStep debuggers can 100% cause or hide race conditions that are exposed via other mechanisms. Especially in multi-threaded apps as I stated. If you've never encountered it, I'd suggest you've never debugged really nasty race conditions or serious bugs.
- not_kurt_godel 1mo agoI have encountered the behavior you are describing too many times to count and then some. Of course step debuggers are going to expose and hide race conditions. In fact, exposing them is often the explicit purpose of using a step debugger in the first place. If you don't have a mental model of your code that includes conceptually separating the actual system behavior from the artificial debugging conditions, then you are correct, a step debugger is not going to be much use to you. Print debugging will help you limp along by virtue of letting you stab a little more accurately in the dark, but ultimately it's usually just punting the actual bug down the line until someone who understands the code more deeply is forced to fix it properly.