this post was submitted on 30 Sep 2023
374 points (90.1% liked)

Programmer Humor

32054 readers
1812 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] ripcord@kbin.social 1 points 11 months ago (1 children)

Or, for cases where you're doing that, use actual debug or trace logging if that is an option.

[โ€“] nakal@kbin.social 1 points 11 months ago

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.