32
Shoutout to the guy who showed me how to use console.log properly
Last month at a coding meetup in Austin, this older dev named Mark watched me struggle with a bug for 20 minutes. He just said "bro, stop guessing and log everything". I had been using breakpoints and getting nowhere, but after he showed me how to dump variables into the console step by step, I found the error in like 5 minutes. Has anyone else had a simple trick like that totally change how they debug?
2 comments
Log in to join the discussion
Log In2 Comments
oliver5231mo ago
Log every single step like Mark said, then look for the one that doesn't make sense.
7
troy_owens1mo ago
Wait, breakpoints actually let you pause and inspect state in real time, which logging can't do.
0