|
|
|
|
|
by nayuki
2786 days ago
|
|
I think it is a fallacy to choose either printing or debugging. I forgot where I read this, but the two techniques are fundamentally different. A debugger lets you stop execution and examine data structures at one point in time. Printing lets you accumulate a log of one particular data structure over a span of time. I think these techniques are complementary and have different effectiveness on different problems. |
|
By using logging instead you’re reimplementing years of good work done by engineers before you.