by locknitpicker · 10mo ago · 0 comments
I don't agree. The first thing any developer does when starting out a project is setting up their development environment, which includes being able to debug locally. Stdout is the absolute last option on the table, used when all else fails.
while you should know this for anything you're proficient in, I usually reach for printf since it's usually quicker than messing with a debugger :)
Nothing is easier than setting a breakpoint in a line of code and running the app.
When a breakpoint is hit, you also have access to local variables and their state. Some debuggers even allow us to change variable values at runtime.
Using printf is effective, but far from being the best way to achieve anything.