Google Chrome Might Have Silently Broken Your Tests, Without You Even Knowing About It

My colleague just discovered that Chrome 58 (released April 19th) has silently muted all console.debug() output in their Chrome Dev Tools.

How? By making changes to the Console UI, from filtering based on type of console method to filtering based on levels. Introducing levels is not a bad thing in and of itself, but they also chose to – by default – NOT show all console output. Only level “Info” and below.

The new "Console UI" in Chrome 58 Chrome Dev Tools. Image credit: Google.

The new “Console UI” in Chrome 58 Chrome Dev Tools. Image credit: Google.

Depending on your project it might also be a big deal to no longer be able to filter by showing only one console method’s output, for example only console.log(). This is particularly troublesome if you’re working on a larger project with hundreds of different types of output mixed together.

As you can see from the comments section in the release notes, this has not been received well by developers:
What’s New In DevTools (Chrome 58)

Failing Tests

This means that if your app or project relies on console.debug() level output for testing, your tests might have been failing for over a month without you even noticing. With not as much as a popup warning or heads up from Google. By making it non-verbose by default, I believe Google has broken best practice here, and done a huge mistake.

via GIPHY

Also, removing the ability to only show output based on a specific console method has resulted in a worsened workflow for many developers.

Test For Yourself

I did some testing with the following console methods in Chrome Dev Tools:

You can simply copy paste this into the console in Chrome Dev Tools, hit ENTER, and change the filter level to see what is displayed in which level.

Screenshots To Illustrate

Here are some screenshots to illustrate the differences between levels. Notice especially the first screenshot of default “Info” level, and the fact that “3 items are hidden”.

Chrome 58, Chrome Dev Tools Console output, level "Info".

Chrome 58, Chrome Dev Tools Console output, level “Info”.

Chrome 58, Chrome Dev Tools Console output, level "Verbose".

Chrome 58, Chrome Dev Tools Console output, level “Verbose”.

Chrome 58, Chrome Dev Tools Console output, level "Warnings".

Chrome 58, Chrome Dev Tools Console output, level “Warnings”.

Chrome 58, Chrome Dev Tools Console output, level "Errors".

Chrome 58, Chrome Dev Tools Console output, level “Errors”.

Have Any Thoughts?

What do you think about this change? Was Google in the wrong for making this change, or do you think it was an improvement to the “Console UI” overall? Please leave a comment below.

Test

 

Robert Axelsen

Robert Axelsen is a JavaScript Developer at Sipwise GmbH, and a passionate "life-long student" of all things code and dev. When he is not busy with code or blogging, he tweets, runs a local Free Code Camp group in Vienna, spends time with his amazing wife and two daughters, and keeps up to date on all things tech. You can read more on his website.

 

Leave a Reply

%d bloggers like this: