DEV Community

Discussion on: why you should not use console.log( ) for debugging ?

Collapse
 
dominikbraun profile image
DB

Just let people debug their programs the way they like it. It is a misconception that IDE debuggers are the best debugging tool - the best debugging tool is the one you know best. If you feel comfortable with console.log, just use that.

Collapse
 
samrocksc profile image
Sam Clark

I think one of the biggest arguments to make here is that almost all modern consumption of logging is done in a cloud interface which is expecting a formatted object. By utilizing console.log, most time people aren't stringifying the data, and just using the strings.

It creates clutter and future technical debt when you've ran up 2000 dollars in logging fees on a lambda service.

Not a critique, just food for thought.