4 ms·
If it's a one-off situation, as opposed to something that should be part of your long-term test cases? Then yes, using print-statements is fine. Everyone does i
by bradley13 2y ago
If it's a one-off situation, as opposed to something that should be part of your long-term test cases? Then yes, using print-statements is fine. Everyone does it, this isn't (or shouldn't be) controversial.
Sometimes a series of print-statements are better for helping you understand exactly when and how a bug occurs. This is particularly true in situations where the debugger is difficult or impossible to use (e.g., multi-threading). Of course, in that situation, logging may be better, but that's just glorified printf.
- mobilemidget 2y agothe glorified printf :) I prefer over non glorified, as it goes to log for future reference etc, imho it has advantages over regular printf.
- XorNot 2y agoMost of the time these days I'm starting to just want compile-in profiling or something. At some point I'm just logging every line of code executed + locals, and I wish that was easier to just ask for.