3 ms·
Both are valid, if your code is slightly complex it's invaluable to run it at least once with a debugger to verify that your logic is all good. And using logs f
by TheRoque 1y ago
Both are valid, if your code is slightly complex it's invaluable to run it at least once with a debugger to verify that your logic is all good. And using logs for this is highly inefficient. E.g. if you have huge data structures that are a pain to print, or if after starting the program you notice that you forgot to add some print somewhere needed.
And obviously when you can't hook the debugger, logs are mandatory. Doesn't have to be one or the other.
- twodave 1y ago> verify your logic This is what unit tests are for.
- compiler-guy 1y agoAnd no one has ever written a buggy unit test.
- ch4s3 1y agoThat’s what the code is for.