[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 
Debugger connected through wire
How to debug a Web page running in Chrome under Android ?
We can connect our debugger to a chrome browser instance running in an Android device through wire.
This way we can debug web applications running in an android device remotelly from desktop.
Prerequisites
See
- Setting up your device
- Check that your device is found listed evaluating the command "adb devices"
 
 - Connecting via the the ADB Chrome extension
 
Short list of steps to debug a chrome page running in Android
- Ensure you have completed steps to install Android SDK ADB connection and you can debug your android device from desktop through wire connection.
 - Issue the following command in the console on your desktop(host machine) to enable port forwarding:
- adb forward tcp:9222 localabstract:chrome_devtools_remote
 
 - Ensure you have already opened Chrome in the device and your page to debug is actually shown (in android's chrome app).
 - Open Chrome browser in desktop(host machine)
 - Press the U8 debugger button (on right side of address bar). A new tab will open with connect option for debugging.
 - Press [Connect] button to see the pages available for debugging in the device
 - Click on the link of the page you want to debug
 - The debugger should enter debug state.
 
References