DEV Community

Discussion on: Stop Console.Logging! This is How to Use Chrome to Debug JavaScript

Collapse
 
natejgardner profile image
Nate Gardner

Have you ever tried stepping through a breakpoint thousands of times, watching a trend over time? Have you ever tried copying the data from a watch into a text document to be uploaded for analysis?

Console.log() is plenty useful. Any time you need to preserve a history over time it's leagues better than anything available in devtools.

Yes, if a developer is unaware of browser debuggers, that developer is definitely missing out, but there are plenty of reasons to use Console.log().

Collapse
 
smeijer profile image
Stephan Meijer

Completely agree. Also, console.table and console.time can be quite handy.

However, I do hope that people are aware that the simple console.log can be set trough devtools as well. Quite often, there is no need to add it to your source directly.

(click right on the line number in chrome devtools and select add logpoint)

Collapse
 
songthamtung profile image
songthamtung

Thanks for reading Nate!

I love your response. These are definitely great use cases for console.log().

Yes this article is meant to shed more light on browser debuggers. I met quite a few of developers who are unaware of devtools and spend the majority of their time console.logging =/