-
Notifications
You must be signed in to change notification settings - Fork 398
Remote Debugging of Firefox Extension
It is possible to debug the Firefox extension embedded using object/embed tag on a page in the inspector UI. When you do that the external interface and other context will be used from the original web page, however Shumway code and options used in the inspector.html.
Run grunt firefox
to build the extension. It's possible to change the code during debug session -- run grunt build
to refresh inspector's code base.
Install the built Firefox extension from ./build/firefox/shumway.xpi. If you are using multiple profiles, install the extension in one that will run a web page.
To enable remote debugging, add boolean shumway.debug.enabled
preference in the about:config, and set it to true
. You may need to restart the Firefox. If you are done with debugging, change the preference to false
to avoid unneeded network connections.
The regular server is needed to execute the inspector, run grunt server
. In addition to that, to enable the remote debugging, execute grunt exec:debug_server
.
Open one browser instance/window/tab at http://localhost:8000/example/inspector/inspector.html, add set "remoteEnabled" inspector option on the Settings tab and restart the page. (Workaround if Settings tab is not visible, open any SWF file)
If you know the URL of the SWF, you can set "remoteSWF" option as well, otherwise see below.
Open Firefox with the extension configured for debugging, and open the page you are trying to debug. If you did not provide "remoteSWF" option (see above), click "Debug this SWF" in the context menu and that option will be set automatically. You will see the green placeholder if the SWF started debugging in the inspector.
The inspector is configured to restart the web page (see "remoteAutoReload" options) when the inspector itself is reloaded.
Mozilla 2019