-
Notifications
You must be signed in to change notification settings - Fork 8
Getting Started
Some helpful hints for those interested in getting started with Crossfire.
Crossfire is a protocol and reference implementation for remote Web Page Debugging.
Firebug/Crossfire is typically considered the "server" while other tools that connect remotely are "clients" which can issue requests and receive data back from Firebug.
However, the Crossfire extension is also capable of operating as a client, for instance to connect to another instance of Crossfire running as a server in a separate Firefox process.
There is a python script located in the /test/
directory of the Crossfire source. It is a command-line test client which implements the JSON-based protocol used by Crossfire. Some examples of using the test client can be found here (this is an older post and so refers to the python script as a test server, however the roles of client and server in Crossfire have since been reversed).
The test client depends on the readline library for handling command-line input, if you're on a *nix type platform you already have this, but on Windows you might need something like pyreadline
The Crossfire Github source uses an Ant build script which is named build.xml
following the Ant default. You will need to install Java and Ant to run the script. Typing ant xpi
in the top-level directory will generate an an XPI file that you can install into Firefox. Note that simply typing ant
to run the default build will probably fail unless you set up JSDoc as detailed below.
The Ant script will attempt to generate documentation using JSDoc, by default if you just run ant
with no target, or if you explicitly specify the doc target with ant doc
. This will most likely fail because it cannot find the directory containing a JSDoc implementation. The Crossfire source does not include JSDoc, you will have to download it separately. By default, the Ant script looks for a directory named jsdoc
in the parent directory of where the build.xml
file is located. You can edit the property ${jsdoc.home}
in the build.xml
file to point to wherever you have put JSDoc.
Rather than having to get the source and build the extensions yourself, you can always opt for a pre-built version of the extension(s) from http://getfirebug.com/releases/crossfire/.
Crossfire adds a DBG_CROSSFIRE
flag to the FBTrace console. Almost every method called in the Crossfire code will log something to FBTrace, so it's a good way to see what's going on, but expect a lot of output if you turn this on.