Debug Hybrid Apps
After completing this unit, you’ll be able to:
- Debug hybrid iOS apps on a device with Safari.
- Debug hyrid Android apps on a device with the Google Chrome browser.
- Use your device to debug Android apps running on your development machine.
Wondering how you can debug hybrid apps in iOS? You use Safari to communicate between your development machine and a real or simulated device. For debugging purposes, you treat your hybrid app as a Web app.
- Open Safari on the desktop.
- Select .
- Click the Advanced tab.
- Click Show Develop menu in menu bar.
- If you’re using the iOS simulator:
- If Xcode is open, press CONTROL and click the Xcode icon in the task bar and then select .
- Or, in a Terminal window, type open -a iOS\ Simulator.
- In the iOS Simulator menu, select .
- Select a device.
- Open Safari from the home screen of the device or iOS Simulator.
- Navigate to the location of your web app.
- In Safari on your desktop, select , and then select the URL that you opened in Safari on the device or simulator. The Web Inspector window opens and attaches itself to the running Safari instance on your device.
Wondering how you can debug hybrid Android apps? You can do that with real or simulated Android devices by with the Google Chrome browser. For current instructions, search for “Remote Debugging” at developers.google.com/web/tools/.
- Debugging Hybrid Apps that are Running on a Mobile Device
- Remote Debugging on Android with Chrome (developer.chrome.com)
- Testing and Debugging in Simulator (iOS Developer Library)