Contents

RequireJS and AMD

Firebug source files are no longer loaded using <script> tags placed in a xul overlay (browserOverlay.xul). Firebug 1.8 uses RequireJS and Asynchronous Module Definition AMD. All files (there are still a few exception) follow the AMD syntax now (see an example).

Globals

FirebugChrome doesn't exist anymore, you need to use Firebug.chrome

FBTrace still exists

Firebug still exists

FBL still exists

Domplate still exists

XUL windows

This section applies to extensions that creates new XUL windows/dialogs and use Firebug API in them.

Vast majority of Firebug extensions overlays firebugOverlay.xul so, the typical entry in the chrome.manifest (this is still the recommended way) file is following:

These extension should have no problem to work with Firebug 1.8 since they are all running in browser.xul scope where all globals are defined by Firebug.

However, those extension that create new XUL windows or dialogs and use any Firebug global variables could face troubles, especially in cases where any of the following files (and others) are included.

These files use AMD syntax and so, they must be loaded by a loader now. In order to use Firebug globals within another XUL scope you have two options:

Pass these globals from the browser window (browser.xul) to the XUL window/dialog through window arguments. This is the preferred way.

Get an existing browser window and access Firebug in it.

Window arguments:

var params ={
Firebug: Firebug,
FBL: FBL
};// This is how you open a dialog and pass parameters to it.var parent = context.chrome.window;
parent.openDialog("chrome://myext/content/myextwindow.xul","_blank","chrome,centerscreen,resizable=yes,modal=yes",
params);// This is how you can get the parameters in onload of the XUL windowvar params = window.arguments[0];var Firebug = params.Firebug;var FBL = params.FBL;