DEV Community

loading...

Discussion on: console.log(x): The way out

Collapse
cherrydt profile image
David Trapp

To me, this smells untidiness: leaving debug data to the eyes of the public is not clean for a professional (when left intentionally).

I disagree. In the website itself yes, but not inside the devtools.

I can't tell you how often I ran into an issue in some web application (sometimes a bug, sometimes just an unforeseen circumstance) that prevented me from doing my work, and I went into devtools to find out what went wrong and either fix it if the reason was external or bypass it or at least understand the problem. In some cases it was easy thanks to debug logs and sometimes it was super annoying because I first had to spend 15 minutes to figure out how to access that flag deeply hidden inside some closure which I could use to force logging on.

I think it is presumptuous to expect everyone who encounters a problem to stop their work and wait until you got time to debug their issue (if you even answer their support email) when they would have the ability to solve their problem themselves - if you hadn't made it intentionally hard by putting hurdles to understanding what's happening in their browser.

I see this annoying trend in desktop software too - while 15 years ago every decent software wrote a logfile, nowadays I often have to resort to reverse engineering just to gather logging data and understand why something doesn't work or crashes ("an error occurred" isn't helpful).

Collapse
princetegaton profile image
Prince Tegaton Author

I understand your point.. But error logs are totally different from debug step logs