Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google chrome js console show thin red line, no printed error text

I'm getting some errors in javascript, but for some reason google chrome wont print the error but shows only a thin red line. Also strange that when the thin red line is displayed the console window scrolls up, but not to the very top of history.

Has anyone seen this before and is there something I can do to get the actual text of errors displayed?

enter image description here

UPDATE: looks that these messages are occurring as result of exceptions in promises. When I debug and step through console.error(ex.message) code it still prints it as a thin red line. Maybe something to do with a permission to use console from a promise thread?

running Google Chrome Version 65.0.3325.181 (Official Build) (64-bit) on Ubuntu Linux.

like image 932
Mobigital Avatar asked Mar 28 '18 18:03

Mobigital


People also ask

How do I show errors in Chrome console?

In Chrome, navigate to Tools > Advanced > Error Console. The error console will open.

How do I see errors in browser console?

Right-click anywhere in the webpage and then select Inspect. Or, press F12 . DevTools opens next to the webpage. In the top right of DevTools, the Open Console to view errors button displays an error about the webpage.


2 Answers

I got this problem too, fixed it by switching to Chrome Canary

And here I thought Chrome Canary was the unstable build. ;-)

like image 162
Lee Comstock Avatar answered Oct 20 '22 12:10

Lee Comstock


I was having the same problem with the red line. Ran the site in Firefox and was able to see the error. In my case there were multiple errors happening in a forEach loop. Looks like Chrome is trying to protect from blowing up the console from errors within a loop?

Firefox just displayed one error. It seems they've found a more elegant way to report to the console.

like image 39
Beanwah Avatar answered Oct 20 '22 12:10

Beanwah