dot.Using Making technology about computers, and computers about usability.

Posted
26 June 2006 @ 12pm

Tagged
development, firebug, firefox, greasemonkey, javascript

Using FireBug’s console logger with GreaseMonkey 0.6.4

FireBug is the best tool (a Firefox extension) for web development ever invented … well, at least one of the best.

The console method  (formerly known as printfire) is a feature of FireBug that enables logging into firebug’s console with different levels. Thing is – it does not quite work with GreaseMonkey scripts. Until now!

The solution is very simple – using GM’s unsafeWindow object. This object is the same as the ‘window’ object that local javascript is seing, and it includes firebug console methods.

Like so:

unsafeWindow.console.info('some informational message');

  • Digg
  • del.icio.us
  • Reddit
  • Technorati
  • email
  • Facebook
  • Google Bookmarks
  • Pownce
  • TwitThis

1 Comment

Posted by
Marcio Wesley Borges
17 November 2008 @ 11pm

Thank you very much!


Leave a Comment

Internet Explorer super-duper-automation abilities Writing helpers with Haml and rSpec