Reputation: 329
Firebug is a great addon and I would love to use it while developing Firefox extensions, unfortunetly it requires a little bit of acrobatics - it seems like it was made mostly with web pages, and not chrome scripts in mind.
I would like to use Firebug console to inspect and manipulate objects created by my extension. Unfortunately, when typing "this" into console I get that the current global object is
Window <url here>
while dumping "this" from my addon scope, I get
Window browser.xul
and this is where my addon, and all it's objects reside. How can I access this object from Firebug console (or the other way - access what is known as "this" to the console from my addon)?
There is a way to do something similar described on MDN:
but it requires the calling script to be a privileged window, which console apparently is not. Running this code snippet in console results in:
Error: Permission denied for <http://siteurl> to create wrapper for object of class UnnamedClass
[Break On This Error]
.getInterface(Components.interfaces.nsIWebNavigation)
Upvotes: 0
Views: 559
Reputation: 1087
You can try Chromebug.
Another way is open chrome://browser/content/browser.xul, then you will see a Firefox browser window in tab, open the parent window Firebug, the window
object is what you want.
Upvotes: 0