Mozilla + Firefox extension development

Wednesday, January 26, 2005

Showing Javascript errors in chrome code

You can get Firefox to show Javascript errors in chrome code by turning on the javascript.options.showInConsole preference. (Which can be done simply by visiting about:config in the browser.)

Another useful preference to turn on is javascript.options.strict, which sends lots of warnings to the console.

(Thanks to Rob Miller for these tips!)


  • Thanks man, this is a golden tip!
    Just started developing my first extension an missed this feature.

    By Anonymous // Rutger, at 10:06 AM  

  • Wow, I was unaware of this...good stuff! This should make development go smoother.

    By Anonymous Zach, at 2:46 PM  

  • This comment has been removed by a blog administrator.

    By Blogger Allan Tokuda, at 3:58 AM  

  • Excuse me, but what is "chrome mode"? I've never heard of it and I don't see any information about it.

    By Anonymous praetis, at 3:59 AM  

  • praetis: code that is run internally by Firefox, Thunderbird, NVu or Seamonkey. JavaScript from extensions is chrome code. Chrome code has more privileges than normal code, for example, chrome code has access to your files, network sockets and your registry. Obviously 'normal' code on webpages does not have access to things like that :-)

    By Anonymous Anonymous, at 2:32 AM  

  • This comment has been removed by a blog administrator.

    By Blogger tweedledeetweedledum, at 12:33 AM  

  • Is there any other way to realize the page loaded had javascript erros than opening the js console? Something like the icon in the status bar showed in IE?

    By Blogger tche, at 2:52 AM  

  • tche, not that I know of. Maybe there is some extension out there that shows a similar icon for Firefox.

    By Blogger David Huynh, at 6:48 AM  

Post a Comment

<< Home