Hacker News new | ask | show | jobs
by 0x457 585 days ago
To be fair, if your code is multithreaded and sensitive to pauses, it becomes harder to debug with a debugger.

Ultimately, if you have a good logging setup and kinda know where the issue is a quick log message could be faster than debugging if all you want to do is look a variable value.

2 comments

That is where OS tracing like DTrace and ETW come into play, which can then be loaded into a debugging session.
Logging can change timing issues though. There are too many cases where an added log statement "fixed" a race condition, simply by altering the timing/adding some form of synchronization inherent in the logging library.
That’s true but boy howdy does pausing the program at a breakpoint change timing!