It depends, it can be useful to easily debug some flows. It’s also sometimes better for interactive applications where pausing the execution would break the interface.
A developer should use both.
It depends, it can be useful to easily debug some flows. It’s also sometimes better for interactive applications where pausing the execution would break the interface.
A developer should use both.
They should, but if given the option to only exclusively use one or the other, I would never in a million years pick it. Because I have put in a tiny bit of effort into understanding how to use a debugger.
Most of them provide you with a feature list that's a strict superset of printf, because they let you set conditional non-blocking breakpoints that can have side effects. Which is perfect for the situation you've described - logging state without blocking. Then you can block and look through that state + any additional relevant info.