23
Overheard my coworker say debug logging is cheating
Last Tuesday my coworker saw me sprinkling console.log() everywhere to find a bug in my first React project. He said real devs use breakpoints and debugger tools, not print statements. I mean, I get it, but for me seeing the values on screen just clicks better. Is relying on console.log as a beginner really that bad, or is it just a stepping stone everyone goes through before they learn the fancy stuff?
2 comments
Log in to join the discussion
Log In2 Comments
jennifer8331mo ago
Why does it matter how you find the bug as long as you find it? Honestly, print statements are how most of us learned, and they still work fine for quick checks.
4
jakejones1mo ago
Tbh, the bigger issue is that print statements train your brain to debug in a certain way. When you rely on them, you end up looking at outputs instead of actually understanding the flow of your code. So yeah, you find the bug, but you don't always learn why it happened in the first place. A good debugger lets you freeze time and inspect everything, which changes how you think about problems. It's like the difference between reading a map and just asking for directions every time you're lost. You get there either way, but one method builds a mental model you can reuse.
3