You can debug your web pages running in Firefox Reality remotely over USB from your computer using the latest release of Firefox for Windows, Mac, or Linux.
To set up debugging you will need to do a couple of things. Don’t worry, it’s easy.
- Install the Android command line tools
- Turn on debugging in Firefox Reality on your VR device
- Turn on debugging in Firefox on your desktop computer
Install the Android command line tools.
First you will need adb, the Android command line debugging tool. There are many ways to get it. The command line tools come with the full install of the Android Developer Suite, but if you only need the command line tools you can install just those. If you are on a Mac follow these instructions to install it using Homebrew. However you get
adb, you should be able to run it on the commandline to see your headset, like this:
MozMac:~ josh$ adb devices List of devices attached 1KWPH813E48106 device
Turn on Firefox Reality Debugging
After you have installed Firefox Reality on your VR device, launch it and click the gear icon to open the settings dialog.
Then click the Developer Options button to open the developer settings, then turn on remote debugging with the toggle switch.
Turn on Debugging in Firefox for Desktop
Note the instructions below are no longer correct. Remote debugging in Firefox for Desktop is much easier now. Please read these official instructions for the correct way.
Open the developer console then select the settings menu option.
Scroll down to advanced settings and turn on the browser chrome and remote debugging options.
You should already have the ADB Helper addon installed. You can check it using the
about:addons page. If it’s not there install it by searching for ADB Helper in the addons page.
Now open the WebIDE. You should see the connected device in the upper right corner:
Now you can select the device and connect to the main Firefox Reality process. Underneath that are entries for each live tab where you can view the console, take screenshots, and get performance information.
That’s it. Debugging pages in Firefox Reality is easy. Once you are connected the experience is much like debugging regular desktop pages. To learn more about how to make web content for Firefox Reality, check out the Developer’s Guide.
Subscribe to Mozilla Mixed Reality Blog
Get the latest posts delivered right to your inbox