|
|
|
|
|
by mark_undoio
585 days ago
|
|
> Sure, it doesn't help much for some scenarios (one I've heard people mention is multithreaded code, where logs are better?), but for most people it's not that far from a superpower. Debuggers can be great for understanding multithreaded code - and you can potentially freeze threads and continue others in order to provoke a particular race condition. However they're potentially quite weak at stepping through a concurrency bug - stopping after each line to understand the sequence of events has a good chance of making your bug go away. I'd say you want Time Travel Debugging if you need to capture and step through a rare event: you get to record the bug happening (without interrupting it) and then step through the recording. On Linux, Undo.io (disclaimer: where I work) and rr (open source) are good at this. On Windows, you have Microsoft's own Time Travel Debug solution: https://learn.microsoft.com/en-us/windows-hardware/drivers/d... (nb. there's also GDB's built-in process record technology but I'd recommend against that for any non-trivial software as the overheads are very high) |
|