Debugging Your Content

Carmel Developer Preview is based on Chromium, so you can use the Chrome Developer Tools to debug and inspect your WebVR application. You can debug remotely either over USB or Wi-Fi.

Enabling USB Debugging

To configure your device for USB debugging:

  1. Open the Settings menu on your device.
  2. Select About device.
  3. Locate Build Number.
  4. Tap Build Number seven times. The developer options notification appears.
  5. Return to the top level of device settings, and then select Developer Options.
  6. Turn on USB Debugging.

Enabling Gear VR Developer Mode

Gear VR Developer mode speeds up your development workflow by letting you run VR applications without inserting your device into the Gear VR headset.

To enable Gear VR Developer mode:

  1. Build an apk signed with your osig file and install it to your device. For more information, see https://dashboard.oculus.com/tools/osig-generator/.
  2. Open the Settings menu on your device.
  3. Select Applications > Application Manager.
  4. Select Gear VR Service.
  5. Select Manage Storage.
  6. Tap VR Service Version several times until the Developer Mode switch appears.
  7. Turn on Developer Mode.

Enabling Wi-Fi Debugging

If you want to debug while your device is plugged into the Gear VR headset, use Wi-Fi debugging. Wi-Fi is necessary because USB debugging does not work when your device is plugged into Gear VR.

To set up Wi-Fi debugging:

  1. Complete the Enabling USB Debugging procedure and then connect your device to your computer with a USB cable.
  2. Install Android Studio.
  3. Open a terminal or Windows command prompt window.
  4. Locate the adb tool if it is not already in your path. On Windows, it is typically located in C:\Users\user\AppData\Local\Android\sdk\platform-tools.
  5. In the terminal window, enter adb tcpip 5555
  6. Open the Settings menu on your device.
  7. Select About device > Status and obtain the IP address of your device.
  8. In the terminal window, enter adb connect x.x.x.x:5555 where x.x.x.x is the IP address.

Starting a Remote Debugging Session with Chrome Developer Tools

After you have your application loaded and running in the Carmel Developer Preview, you can debug it remotely using the Chrome Developer tools.

To start a remote debugging session:

  1. Load and run your application in the Carmel Developer Preview.
  2. Launch Chrome and then open the Chrome developer tools.
  3. Select More tools > Remote devices to open the Remote devices tab.

  4. Select your device from the list on the left.
  5. Click the Inspect button next to com.oculus.carmel.player_apk.

For more information about remote debugging with Chrome Developer Tools, see: https://developers.google.com/web/tools/chrome-devtools/remote-debugging/