2 ms·
With some discipline, you can also make those debug statements bonafide log statements, which you will likely need for production anyway. You can't do this with
by throwaway894345 6y ago
With some discipline, you can also make those debug statements bonafide log statements, which you will likely need for production anyway. You can't do this with a debugger (although you can attach a debugger in certain circumstances, it is rare in production, it's not a complete solution, and it may violate compliance).
- dahart 6y agoAbsolutely, once a project hits a certain size, I can attest to the value of taking some time to establish a logger with a verbosity knob and command line control. Making it as easy to use as a print statement, but with a default quiet setting, means I can more easily plan and multiply the value of my efforts printing things. Plus, a good logging system works in release builds where a debugger might not.