How to See JavaScript Console in Meta Quest Browser
Developing for the Meta Quest browser can be challenging without proper debugging tools. Fortunately, you can access the JavaScript console using ADB (Android Debug Bridge) remote debugging. This guide will walk you through the steps to set up your environment and start debugging your web applications in VR.
Prerequisites:
- Meta Quest device with Meta Quest Browser
- Google Chrome browser on your computer
- USB-C cable to connect your Quest to your computer
- WiFi to wirelessly connect Quest to your computer
Step-by-Step Guide:
Download and install Meta Quest Developer Hub
Once installed, configure ADB. You may see a popup which informs you that there is another ADB client installed on the computer.
Make sure to set the ADB path appropriately.
Continue to connect a device by clicking "Set Up New Device"
Use the Device setup flow to connect your computer to your device.
Next, setup the ADB bridge with the device.
Connect the headset to the computer via USB.
Then, put the headset on and Allow USB Debugging.
Congrats, you've setup your device!
Your device will now show up in Meta Quest Developer Hub.
Run `adb devices` to see your connected device on the CLI.
Setup wireless ADB debugging.
adb shell ip route
adb tcpip 5555
adb connect ip:port
Optional: If you have a local webserver, setup a reverse proxy
adb reverse tcp:5500 tcp:5500
Access the JavaScript Console via Chrome DevTools
On your computer, open Google Chrome. In the address bar, type the following and press Enter:
chrome://inspect/#devices
You should see your Meta Quest device listed under "Remote Target." Below it, you'll see open tabs in your Meta Quest Browser. Click the "inspect" button next to the tab you wish to debug.
A new Chrome DevTools window will open, connected to your Meta Quest Browser tab. From here, you can access the Elements, Console, Sources, Network, and other debugging panels just as you would for a desktop browser.
With these steps, you can effectively debug your web applications running in the Meta Quest Browser, making your VR web development process much smoother.