Re:Console.table()
by megaman22 on Thursday June 14, 2018 @06:49AM
(#17310696)
Sometimes you just can't do that, without completely breaking everything while the program is halted in the debugger. Particularly real-time, multithreaded applications.
[ Parent
| on HN ]
Re:Console.table()
by organsnyder on Thursday June 14, 2018 @07:38AM
(#17310866)
In those situations, even adding printf statements can be enough to change the behavior of the system.
Not necessarily. It's about timescales and other environmental factors. Pausing in a debugger is measured in seconds. Your network-using application won't notice extra half ms for a print statement, but might change its behaviour if you pause it for 5 seconds, as requests will timeout. A video game running in fullscreen won't mind printing to console/file in the background, but may not handle well being interrupted in the middle of rendering and having you switch focus to the debugger (less of a problem these days, but I remember this being a pain ~10 years ago).