Introduction
This document describes how to debug AR content using standard debugging mechanism provided by Android.
Please Note: currently this is only available for Android devices – iOS is not supported.
Install/start Android Platform Tools
- On the development machine open Chrome
- Open https://developer.android.com/studio/releases/platform-tools.html
- Download the „SDK Platform-Tools for Windows“ .zip file
- Unzip the files into a chosen directory
- Open a windows console
- Go to the directory with the unzipped files
- Run „adb.exe start-server“
Enable USB Debugging on your Android Device
- On your Android device go to Settings > Developer Options > Enable USB Debugging
- See On-Device Developer options and how to enable it: https://developer.android.com/studio/debug/dev-options.html#enable
Enable Debugging on your development machine
- On the development machine open Chrome
- Remote debugging does not work in Incognito Mode or Guest Mode.
- Open DevTools: https://developers.google.com/web/tools/chrome-devtools/#open
- Select More Tools > Developer Tools from Chrome’s Main Menu.
- In DevTools, click the Main Menu then select More tools > Remote devices.
- In DevTools, click the Settings tab, if another tab is showing.
- Make sure that „Discover USB devices” is enabled.
- Connect your Android device directly to your development machine using a USB cable.
- Don’t use any intermediate USB hubs.
- If this is your first time connecting your Android device to this development machine, your device shows up under Unknown, with the text Pending Authorization below it.
- If your device is showing up as Unknown, accept the Allow USB Debugging permission prompt on your Android device.
- Unknown is replaced with the model name of your Android device.
- The green circle and the Connected text indicate that you are all set to remotely debug your Android device from your development machine.
- Note: If you have any issues during the discovery process, you can restart it by selecting Settings > Developer Options > Revoke USB Debugging Authorizations on your Android device.
Start debugging an HTML example
- Start your AR App on Android
- Scan a target with the App
- The to be debugged Webview appears
- Click on „Inspect“
- A window with the debugging information pops up
- You can now debug the requested information
- Once debugging is finished go to the windows console and run „adb.exe kill-server“