T
10

The debate over using debugger vs console.log for learning is real

I spent 3 hours last night stuck on a loop that wasn't running right. I kept using console.log to check values but it was a mess tracking everything. Then I tried the debugger tool in Chrome for the first time and saw exactly where the variable was changing. It felt way faster but also confusing to set up at first. Which do you think beginners should actually stick with when they're just starting out?
2 comments

Log in to join the discussion

Log In
2 Comments
rowan2
rowan26d ago
Yeah did your buddy ever try stepping through code with the debugger? @thomas.tyler is right that it can feel like a lot at first, but I had a friend who spent a whole afternoon trying to fix a bug with console logs, got nowhere, then one time with the debugger he found the issue in like 5 minutes. It's a steep hill to climb but once you get the hang of it there's no going back.
6
thomas.tyler
Ugh yeah I feel this. Stick with console.log at first, debugger will just confuse you more.
2