No devices detected when remote debugging in Chrom

2019-02-16 00:22发布

问题:

I am having problems with a web application on Chrome in Samsung Galaxy Tab A.

I want to troubleshoot them with Chrome's Developer Tools.

On tablets you do not have access to Chrome's Developer Tools, so you need to set up Remote Debugging.

The process, according to Google's official documentation, should essentially be:

1) Install the required driver on the PC so the tablet can be recognised.

2) Connect the tablet to the PC via USB cable.

2) On PC, go to Chrome > Developer Tools > Menu > More Tools > Remote devices

The tablet is not showing up as a device in developer tools in chrome on PC.

What I've Tried

I chatted to Samsung and they said to install Smart Switch PC_Setup.exe which would install driver so that Android device can be recognised.

As that didn't work I followed various post suggestions and installed:

  • SAMSUNG_USB_Driver_for_Mobile_Phones.zip (15.3MB) from here

  • SDK Platform-Tools for Windows (7.16MB) from here

  • sdk-tools-windows-3859397 (132MB) from the bottom of the page here

All of these contain exe files that I don't know how to use - if I double click them they just open and close a terminal.

Desired Behavior

To have tablet show as a device in Chrome developer tools.

回答1:

To get my Samsung S7 to connect, I did the following.

  1. Download Samsung's USB Driver for Windows from here: http://developer.samsung.com/galaxy/others/android-usb-driver-for-windows
  2. Install the driver
  3. Uninstall the driver. It's important to do this step, as your device won't connect until you uninstall. Strange, I know!

I initially reported this solution in the comments section here but I didn't think it was a legitimate solution. I've since been able to reproduce this on 2 Windows 10 Pro devices and others have also confirmed.



回答2:

This was my solution to show device in Chrome Developer Tools:

1) Download SDK Platform-Tools for Windows (7.16MB) from here.

2) Extract zip file.

3) In Windows terminal run your equivalent of:

D:\Users\You\path_to_extracted_folder\adb.exe devices

At first I got:

[5203253125 - long number] unauthorised

And then I think I unplugged and replugged USB cable from tablet and there was a prompt on the tablet:

Allow USB Debugging?
The computer's RSA key fingerprint is:
blah blah etc

to which I click OK

And I can now see device in Chrome Developer Tools!



回答3:

I find the best approach these days is to not use vendor-provided drivers. They're often difficult to install, and frequently come bundled with tools that aren't required and which get in the way. I tend to use the "universal" driver that can be downloaded from http://adbdriver.com/, which comes with a very simple, easy-to-use installer: run the installer, it gives a list of phones or tablets attached to your computer via USB, press a button and it installs the driver for the selected device.