3 ms·
1. Use println 2. That's fine, they'll just build some cloud feature
by koakuma-chan 10mo ago
1. Use println
2. That's fine, they'll just build some cloud feature
- vkou 10mo ago> 1. Use println Printf debugging is a usability and productivity disaster compared to an actual debugger.
- speedgoose 10mo agoIt 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.
- vkou 10mo agoThey 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.
- tester756 10mo ago>1. Use println why use so primitive methods that only work under certain circumstances