Quick answer: Stop using stepping breakpoints; instead capture the bug with low-overhead conditional logging, tracepoints that do not pause execution, or a recorded trace you can replay deterministically afterward.
Some bugs evaporate the instant you set a breakpoint because the act of pausing reorders the very timing that triggers them. You cannot step through a race condition. You have to observe it without disturbing it, then analyze the recording.
How to catch it
1. Use non-pausing tracepoints
In your IDE, set a breakpoint that logs a message and continues instead of halting (a tracepoint). It records the value and order of events without altering the timing that the bug depends on.
2. Add conditional and high-resolution logging
Log a timestamp and thread id at each suspect point, gated by a condition so it does not flood. Comparing the order across runs reveals the interleaving the debugger was hiding.
3. Force the bad timing on purpose
If you suspect a race, inject a tiny sleep or yield at the suspected window to make the rare interleaving happen every run, turning the heisenbug into a reliable one you can then fix.
4. Record and replay if you can
Tools like rr (Linux) or a deterministic replay system let you capture one failing run and step through it backward as many times as you like, with the original timing frozen in the recording.
Catching the ones you can't reproduce
The hardest version of this to fix is the one you can't reproduce — it only happens on a player's hardware, OS, driver, or save state, under conditions that simply aren't present on your machine. A report that says “it crashed” or “it froze” gives you nothing to act on, so the bug survives release after release while quietly costing you players.
Automatic error capture closes that gap. Each failure arrives with its full stack trace, the device and OS, the build number, and a breadcrumb trail of what the player did right before it broke, so even a failure you have never seen becomes a specific, reproducible issue. Fold identical failures into one signature ranked by how many players each hits, and your worklist sorts itself worst-first instead of arriving as a stream of vague complaints.
This is where a tool like Bugnet earns its place. Its SDK captures every error automatically with the full stack trace plus device, OS, memory, build, and game-state context, folds duplicates into one grouped issue with an occurrence count, and ties each to the build it first appeared on — so you fix the problem that hurts the most players first and confirm it is gone when its signature disappears from the next release.
The bug you can't reproduce isn't gone — it's just invisible until you capture it from the player's device.