Debug Android Chrome Web page Concise Memo

Source: Internet
Author: User

Essential Tools adb tools,android Chrome

Turn on the phone debug mode first

ADB forward tcp:9919 localabstract:chromedevtoolsRemote

成功会提示* daemon not running. starting it now on port 5037 ** daemon started successfully *不成功的话用这个命令再试adb kill-server

Then open the link below, where the 9919 is specified in the ADB command above

http://localhost:9919/

You will see a link like this:

Http://chrome-devtools-frontend.appspot.com/serve_rev/@176236/devtools.html?ws=localhost:9919/devtools/page/1

Due to the well-known reason Appspot is in the heterogeneous space, we need to use the cost of the debugger

To replace the cost of devtools.html with a chrome-devtools://devtools/bundled/devtools.html .

chrome-devtools://devtools/bundled/devtools.html这个地址可能会不一样可以用弹出窗口的方式打开调试器在弹出来的调试器中按ctrl+shift+i来调试调试器,在新的调试器获得这个地址(很拗口,但就是这样)

Once you have the correct local debugger address, you can replace it with a script

"' JavaScript

var tabs = Document.queryselectorall (' A '), Localdevadd = ' chrome-devtools://devtools/bundled/devtools.html ';

for (var i = 0; i < tabs.length; i++) {if (Tabs[i].href && tabs[i].href.indexof ('/devtools.html ') >-1) {T Abs[i].href = Tabs[i].href.replace (/.*devtools.html/, Localdevadd); }}

```

Click on the corresponding tab to see the debugger.

Graphic version Http://www.tuicool.com/articles/ZJfeAzi

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.