Android Chrome://inspect 显示设备虽然不显示任何打开的标签

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24744622/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 08:40:54  来源:igfitidea点击:

Chrome://inspect displaying device though not displaying any opened tabs

androidgoogle-chromeremote-debugginginspect

提问by xMythicx

I am trying to utilize chrome for remote debugging of an android web application. I am unable to get any open tabs from the device to show under chrome://inspect list for remote debugging.

我正在尝试利用 chrome 远程调试 android web 应用程序。我无法从设备获取任何打开的选项卡以在 chrome://inspect 列表下显示以进行远程调试。

I have done the following:

我做了以下工作:

  1. Made sure my device driver is installed appropriately.
  2. Turned on developer mode and usb debugging on my device via the developer menu.
  3. Checked and made sure that my device is listed in adb list via issuing "adb devices" from the command line.
  1. 确保我的设备驱动程序安装正确。
  2. 通过开发人员菜单在我的设备上打开开发人员模式和 USB 调试。
  3. 通过从命令行发出“adb devices”,检查并确保我的设备列在 adb 列表中。

My device is displayed under the device list via (chrome://inspect) just cant seem to get any open tabs listed any help would be much appreciated. Thanks

我的设备通过 (chrome://inspect) 显示在设备列表下,但似乎无法列出任何打开的选项卡,任何帮助将不胜感激。谢谢

Device: Samsung Galaxy Tablet 10.1 Android 4.2.2

设备:三星 Galaxy Tablet 10.1 Android 4.2.2

enter image description here

在此处输入图片说明

采纳答案by xMythicx

Ok you must use chrome mobile in order to debug any webviews or browser tabs. No other browser works. I was unaware of this.

好的,您必须使用 chrome mobile 才能调试任何 webviews 或浏览器选项卡。没有其他浏览器工作。我对此一无所知。

//Edit

//编辑

As of Android version 4.4 or later this is no longer the case. Android 4.4 has support for debugging internal Webviews. Please see https://developer.chrome.com/devtools/docs/remote-debugging#debugging-webviews

从 Android 4.4 或更高版本开始,情况不再如此。Android 4.4 支持调试内部 Web 视图。请参阅https://developer.chrome.com/devtools/docs/remote-debugging#debugging-webviews

回答by bbsimonbb

Using chrome://inspect/#devices, if the device is detected, but tabs open in chrome on the device are not listed, look for the "activate USB debugging" option in the chrome settings-->developer options tab on the device. This is in addition to the USB debugging option you've already checked in the Android developer settings.

使用chrome://inspect/#devices,如果检测到设备,但是设备上chrome打开的标签没有列出,在chrome设置-->开发者选项标签中查找“激活USB调试”选项. 这是您已在 Android 开发人员设置中选中的 USB 调试选项的补充。

回答by xMythicx

After connecting your device, make sure you open Chrome browser on the device and after that refresh the Chrome window on your PC. This will display the entry of the opened Chrome browser on the device. It will not launch if you don't first open Chrome browser on your phone

连接设备后,请确保在设备上打开 Chrome 浏览器,然后刷新 PC 上的 Chrome 窗口。这将显示设备上打开的 Chrome 浏览器的条目。如果您不先在手机上打开 Chrome 浏览器,它将不会启动

回答by chichirona

I already tried that. It did not work for me, but I found this:

我已经试过了。它对我不起作用,但我发现了这个:

  • first open a new folder for a bookmark
  • then you need to use this in the URL copy and paste this to your v=bookmark URL:
  • 首先为书签打开一个新文件夹
  • 那么您需要在 URL 复制中使用它并将其粘贴到您的 v=bookmark URL:
javascript:document.body.contentEditable = 'true'; document.designMode='on'; void 0

Once you've done that you can name it anything you want.

完成后,您可以将其命名为任何您想要的名称。

(NOTE, you need to be in the tab you will like to inspect/edit).

(注意,您需要在要检查/编辑的选项卡中)。

Just click on the bookmark you just made then you will be able to practically edit anything you want to with this editing mode.

只需单击您刚刚制作的书签,您就可以使用此编辑模式几乎编辑任何您想要的内容。

Hopefully That Helped You. (:

希望对你有帮助。(: