2 ms·
> But you can become efficient anyway, and for a task where printing is not enough, you can always spin up the heavy tools. this exactly. Print based debuggin
by horsawlarway 4y ago
> But you can become efficient anyway, and for a task where printing is not enough, you can always spin up the heavy tools.
this exactly.
Print based debugging is a great way to verify all sorts of assumptions, and it gives a wonderful order based view of execution very quickly.
If that turns out not to be enough - by all means, break out the real debugging tools, but I'd wager 95% of the time, print based debugging will lead you to the answer more quickly and easily than spinning up gdb or inspect-brk or visual-studio or any of the other heavy weight tools.
Not that those tools aren't incredible (I mean that so literally) - it's just that they're like bringing a back-hoe in to plant your tulip bulbs... it's complete overkill for answering questions like "Did this code even run?" or "how many times is this function getting called" or "is function a called before function b" and SO many other useful basic tests for my assumptions.