Google Chrome for Android Remote Debugging - “localhost:9222” Not Available

人盡茶涼 提交于 2019-12-02 16:38:33

I found that I had to have USB debugging enabled on Chrome and on my device.

  1. Chrome for Mobile - Settings > Developer Tools > [x] Enable USB Web debugging
  2. Device - Settings > Developer options > [x] USB debugging
  3. Connect Device to Computer
  4. Enable port forwarding on Computer

    C:\adb forward tcp:9222 localabstract:chrome_devtools_remote

  5. Go to http://localhost:9222 in Chrome for Computer

Can you please provide the version of Chrome on Android you are using? Open "about:version" URL and please provide values of "Google Chrome" an "Application" fields.

And can you please check the following -- after you turn on USB Web debugging (step 2 of the doc), what this sequence of commands outputs to you:

adb root
adb shell cat /proc/net/unix | grep chrome_devtools_remote

(The idea is to check, if the remote debugging socket opens on the device after you turn on USB Web debugging)

Piggo

Have you changed your localhost at all? If so then try 127.0.0.1:9222 instead of localhost:9222.

I had two really dumb problems preventing me from doing this correctly, maybe my experience will help.

1: The "adb forward..." from the most voted-up comment on the YouTube channel explaining how to do it contains a few weird characters (https://www.youtube.com/watch?feature=player_embedded&v=s4zpL4VBbuU). If, like me, you pasted it in cmd without double-checking, the server will start without an error, but the service won't work properly. Make sure you're using this line with your path to adb

adb forward tcp:9222 localabstract:chrome_devtools_remote

2: ESET NOD32 Antivirus has this thing called HIPS (Host-Based Intrusion Prevention System), and it doesn't like you messing around with localhost:####

http://kb.eset.com/esetkb/index?page=content&id=SOLN2950

Maybe your Antivirus software has something similar that can be deactivated?

Hope this helps someone ^_^

You no longer need to fuss with adb, downloads or command lines. With Chrome v41 (canary), I just plugged in the phone, pointed the browser to chrome://inspect, then hit the "inspect" link below my device, and the debug window opened and worked. (Enable USB debugging in the developer options on the phone)

I add that this worked first time, whereas my efforts with Chrome v39 plus the platform tools sdk, adb and the rest, had still not given fruit after 6 hours or so.

The remote debugging features requires a small check. The USB debugging features should be rather turned off and only the option for USB Debugging under chrome (android) settings should be checked.

Also, run the adb forward command twice(the complete command with specific arguments).

Try downloading the Chrome Browser for Android in your phone. And then navigate again in your Desktop to localhost:9222 Android Remote Debugging just works with the mobile Chrome browser. Some users think that the native Android browser is Chrome but it isn't.

C:\adb forward tcp:9222 localabstract:chrome_devtools_remote

helped me to find the cause on my system. It was having multiple devices connected. After removing all the devices, and connected only one required device resolved the issue.

I found a solution to this problem. I've been looking for one last day same command in the tutorial

https://developer.chrome.com/devtools/docs/contributing-legacy

"C:\Users\%username%\AppData\Local\Google\Chrome SxS\Application\chrome.exe" --remote-debugging-port=9222 --no-first-run --user-data-dir=C:\Users\%username%\chrome-dev-profile http://localhost:11002#http://localhost:8000/front_end/inspector.html

Then I can use localhost: 9222 on the browser.

Right now I would like to comment on the answer to help someone.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!