Friday, December 2nd, 2005

Firefox 1.5: JavaScript Console Highjacking

Category: Firefox

I noticed that my JavaScript console started to spew out CSS errors in 1.5 land:


Then I saw information about Console2 which gives you just JavaScript errors, and lets the CSS ones go by.

Having access to CSS errors is great, but it would be nice to be able to toggle exactly what we want to see.

Posted by Dion Almaer at 10:01 am

3.6 rating from 10 votes


Comments feed

Good find. I personally like to be able to click “clear” in the normal version to quickly wipe the slate clean before I refresh, but I suppose one extra click is worth the much-needed extra functionality.

Comment by David Carrington — December 2, 2005

The new console in 1.5 is really a bad piece of work. Not only does it spew out errors about everything, they’ve also increased the pickyness of FireFox on accepting files – I found a logged message in the console saying that PHPMyAdmin’s CSS was being altogether rejected because it didn’t have the correct mime type. (it’s generated from a .php file and there’s no header() function useage in there). Sloppy work on PHPMyAdmin’s end but honestly – FireFox needs to be more flexible than this.

Comment by Robb Irrgang — December 2, 2005

If you fix your CSS errors, you won’t have to see them. But it is rather obnoxious to see them when working on some one else’s web site and seeing all the CSS errors.

Heck, I do some work with a customer that uses Sputnik (wifi system) and they have 100’s of CSS and javascript errors. Makes the console useless for debugging anything.

Rendering pages with errors was a mistake in the first page.

Comment by Phill Kenoyer — December 2, 2005


All I would want is an area with checkboxes for:

[ ] CSS
[ ] JavaScript
[ ] … other errors!

And they may want to rename it from “JavaScript Console” :)



Comment by Dion Almaer — December 2, 2005

Filtering and naming options are mentioned in this bug (including checkboxes, etc.)

Comment by Scott Schiller — December 2, 2005

Yeah, who uses those attributes, anyway? ‘layer-background-color’, ‘filter’? This is all proprietary IE stuff. Bad.

Comment by David — December 2, 2005

Absolutely true. the css error taking too many error lines. need filter

Comment by john — December 2, 2005

Improper CSS can cause js errors. I’m not saying it’s easy, but it’s quite possible. However I do understand the need for filters, though. But, I’d like to ask that instead of loading the IE stuff in firefox by just throwing it all in the same CSS, to use the if ie < 9 (it will be forever before they use css properly) tag to load a secondary ie.css file. This would save bandwidth for your site (since those not using IE wouldn’t need to load extra crap) and would prevent other browsers from choking on your proprietary code.

Meh. You won’t take the advice anyway :(

Comment by Tom — December 2, 2005

This is great news, as I have a project at work, where we use Microsoft Sharepoint (with two standard Sharepoint CSS files). These files have lots of CSS errors, which makes it sometimes hard to find the JavaScript errors.

Comment by Jesper Rønn-Jensen — December 3, 2005

First off, I’m glad I stumbled in to this site. Great resource.

I totally agree a filter is needed, but I also am glad it shows CSS errors too.

The problem is, there is a vast ocean of garbage code out there that is mostly a result of the bad old days of HTML, where Netscape and IE allowed malformed markup. No one ( esp. Microsoft ) is willing to stand up and refuse to render shit pages because then that browser gets tarred as “broken” as it will not “work” properly.

One hopes that with the emergence of AJAX, SVG, and XHTML it’ll change, but then again, the shambling corpse of IE will be haunting us for many years to come.

Comment by Wandering Eye — December 4, 2005

I had the same concern a month ago, in using the 1.5 betas, but first found another useful hack for doing error message grepping conveniently (prior to finding Console² []) — Console Filter! [] These two extensions together seriously pack a punch.

Comment by Johan Sundström — December 5, 2005

btw, for David up there, ‘layer-background-color’ is actually a NN4 attribute, and not an IE one. Sometimes it would be nice if everyone didn’t jump all over the “I hate M$” bandwagon…they *are* the ones that created XmlHttpRequest, after all.

Comment by Tom Trenka — December 6, 2005

Why still call it the JavaScript console if it’s going to spew out all the CSS and XUL errors caused by bad webpages and faulty extensions? I’d love the ability to turn on/off which errors I see because it’s annoying to see half-a-bazillion css errors when I’m watching for a javascript error. Oh well.. just my 2 cents.

Comment by Josh Hansen — December 13, 2005

I’ve reported this as a bug –

Comment by brothercake — January 15, 2006

Leave a comment

You must be logged in to post a comment.