Because if you invested a lot of time on carefully choosing the places where printf
should be to get all the info you need, you just need to unset NDEBUG
and voilà everything that you need is there again.
Because if you invested a lot of time on carefully choosing the places where printf
should be to get all the info you need, you just need to unset NDEBUG
and voilà everything that you need is there again.
I am not a guy who blindly trusts technology. Why go forward when you cannot see what’s in front of you? How can that happen?
AFAIK Google makes a disclaimer about it. A bridge can also be destroyed on the same day, so…
Of course, it’s better to use some frameworks for logging, especially because these verbose statements are often needed for assertions while unit testing the code. But it’s still equivalent to
printf
.I use debugger sometimes. I actually like to load core dumps to take a look at the stack trace. But I usually don’t really need debugger interactively because when some error appears, I usually already have an idea what happened. And lots of embedded code needs timing in milliseconds, so debuggers won’t help.