18
Console.log() saved me after 3 days of guesswork
I was stuck on a bug in a simple calculator app, everything looked fine until I saw the variable was actually a string. Throwing a console.log() right before the math operation showed it instantly. Has anyone else had a moment where the dumbest tool beat every fancy debugger?
1 comments
Log in to join the discussion
Log In1 Comment
wyatt_fox688d ago
The trick is knowing when to stop trusting the tools and start trusting your eyes... a debugger gives you a thousand panes and breakpoints, but console.log just shows you the raw truth, no fluff. The calculator app thing is classic too, string vs number, always sneaks up on you when you least expect it. What gets me is how many people skip the dumb logs and jump straight to fancy tracing, then end up more lost than when they started. Sometimes you gotta just print the damn thing and stare at it for a minute, that's where the real answers come from.
1