Don't use print, use a logger. Loggers can be tuned. Debuggers are fine if you know how to use them, but setting them up and getting them working properly is usually a pain in the ass. You need the log statements so you can debug in a non development environment anyway. Hell, Splunk had made a lucrative business out of it.
Depends on when I'm debugging. Anything that gets committed I use a logger, but print is more portable and I have a hotkey for it. I use it for sanity checking values and delete them when I'm done.
47
u/sam_mit Dec 20 '25
why is that even a choice?? print statements only!!!
35
u/LetUsSpeakFreely Dec 20 '25
Don't use print, use a logger. Loggers can be tuned. Debuggers are fine if you know how to use them, but setting them up and getting them working properly is usually a pain in the ass. You need the log statements so you can debug in a non development environment anyway. Hell, Splunk had made a lucrative business out of it.
7
u/SaltyInternetPirate Dec 20 '25
Debuggers are for when you're desperate not to wait 20 minutes for the build.
3
u/Nardo_Dragon776 Dec 20 '25
All the time I have in coding was a coding class in school and I agree to this statement
3
u/doc720 Dec 20 '25
I must have re-learned how to use the proper debugger tools about 10 times now, but still...
2
u/PruneInteresting7599 Dec 20 '25
sounds like js
2
u/magicman_coding Dec 20 '25
Print...the answer is print
2
u/ByteBandit007 Dec 21 '25
console.log();
1
u/Junaid_dev_Tech Dec 20 '25
True bro
1
u/Spicy_tacos671 Dec 20 '25
Never
1
u/warmagedon007 Dec 20 '25
Red is for debugging multi threaded programs race conditions. The blue is for all other problems.
1
u/UltraTata Dec 20 '25
Debugger sex (idk how to use it)
1
u/arttast Dec 21 '25
I play my "i dont have a jlink" card
1
u/cobhalla Dec 21 '25
Using a global boolean called Debug which turns on and off all your print statements dor debugging
1
u/LordUzumaki Dec 21 '25
Print statement! 100%! Lol
1
u/blamitter Dec 21 '25
Love adding print statements within print statements, especially when the message is the magical keyword "break"
1
u/KaleidoscopeThis5159 Dec 22 '25
🤓 Print statements that only show up in debug mode, using preprocessor directives
1
u/BKhalissi Dec 23 '25
Comment
1
u/EatingSolidBricks Dec 24 '25
Im lazy and incompetent, now laugh