Remote debug live content on an Android device from your Windows, Mac, or Linux computer. This tutorial teaches you how to:
The workflow below works for most users. See Troubleshooting: DevTools is not detecting the Android device for more help.
chrome://inspect#devices
.Make sure Discover USB devices is enabled.
Connect your Android device directly to your development machine using a USB cable.
If you are connecting your device for the first time, the device will show up as "Offline" and pending authentication.
In this case, accept the debugging session prompt on your device's screen.
If you see the model name of your Android device, DevTools has successfully established the connection to your device.
Continue to Step 2.
Make sure that your hardware is set up correctly:
Make sure that your software is set up correctly:
If you don't see the Allow USB Debugging prompt on your Android device try:
If you find a solution that is not mentioned in this section or in Chrome DevTools Devices does not detect device when plugged in, please add an answer to that Stack Overflow question, or open an issue in the developer.chrome.com repository!
In chrome://inspect/#devices
on your development machine, you see your Android device's model name, followed by its serial number. Below that, you can see the version of Chrome that's running on the device, with the version number in parentheses.
In the Open tab with url text box, enter a URL and then click Open. The page opens in a new tab on your Android device.
Each remote Chrome tab gets its own section in chrome://inspect/#devices
. You can interact with that tab from this section. If there are any apps using WebView, you see a section for each of those apps, too. In this example, there's only one tab open.
Click Inspect next to the URL that you just opened. A new DevTools instance opens.
The version of Chrome running on your Android device determines the version of DevTools that opens on your development machine. So, if your Android device is running a very old version of Chrome, the DevTools instance may look very different than what you're used to.
Below the URL you can find a menu to pause, focus, reload or close a tab.
Go to the Elements panel of your DevTools instance, and hover over an element to highlight it in the viewport of your Android device.
You can also tap an element on your Android device screen to select it in the Elements panel. Click Select Element on your DevTools instance, and then tap the element on your Android device screen. Note that Select Element is disabled after the first touch, so you need to re-enable it every time you want to use this feature.
Click Toggle Screencast to view the content of your Android device in your DevTools instance.
You can interact with the screencast in multiple ways:
Some notes on screencasts:
In some rare cases, an alternative method of remote debugging may be useful. For example, you may want to connect directly to the Chrome DevTools Protocol (CDP) of your Chrome on Android.
To do this, you can use the Android Debug Bridge (adb):
Connect the Android device to your development machine through:
In your development machine's command line, run adb devices -l
and check if your device is present in the list.
Forward the CDP socket on the device to your machine's local port, for example, 9222
. To do this, run:
adbforwardtcp:9222localabstract:chrome_devtools_remote
Once successfully connected, see that:
http://localhost:9222/json
lists your page
targets.http://localhost:9222/json/version
exposes the browser
target endpoint, as the CDP documentation indicates.chrome://inspect/#devices
is populated, even without the Discover USB devices setting checked.For troubleshooting, see:
adb
documentationOptionally, you can read older guides:
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2015-04-13 UTC.