For one of the projects I'm working on, I have to use DOM Inspector to debug a Firefox extension.
The problem with DOM inspector is that it only shows you the browser below the code, there's no way to detach the browser or out the code section or browser side by side.
It didn't work for me because the plugin I was debugging had a large xul overlay, and the problematic area was at the botton, so there's no physical way to see the code for the area as well as the area itself.
So I have decided to modify DOM Inspector itself to place browser to the side of the code editor.
Here are the steps I undertook:
- Took the existing xpi file from the profile directory.
- Changed it to be a zip.
- Went inside and extracted
inspector.jar
usingjar -xf <filename>
- Went to
inspectorOverlay.xul
and changed<vbox id="bxInspectorMain">
to be an hbox. (This should be enough to position those two windows horizontally.) - Then I recreated jar file using
jar cf
. - Zipped the directory making sure that the name is the same and changed extension back to xpi.
However, when I try to run it, I get the following warnings:
Warning: WARN addons.xpi: Add-on is invalid: [Exception... "Component returned failure code: 0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) [nsIZipReader.getInputStream]" nsresult: "0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST)" location: "JS frame :: resource://gre/modules/XPIProvider.jsm :: loadManifestFromZipReader :: line 740" data: no]
Source File: resource://gre/modules/XPIProvider.jsm
Line: 740
Warning: WARN addons.xpi: Could not uninstall invalid item from locked install location
Source File: resource://gre/modules/XPIProvider.jsm
Line: 2042
My question is - what other changes do I generally need to make for the xpi to be properly interpreted?