首页 > 其他 > 详细

chrome.debugger

时间:2019-02-19 17:09:24      阅读:206      评论:0      收藏:0      [点我收藏+]
官网:
https://chromedevtools.github.io/devtools-protocol/
https://developer.chrome.com/extensions/debugger
chrome.exe --remote-debugging-port=9222
Then you can start a separate client Chrome instance, using a distinct user profile: chrome.exe --user-data-dir=<some directory>

Now you can navigate to the given port from your client and attach to any of the discovered tabs for debugging: http://localhost:9222


You will find the Developer Tools interface identical to the embedded one and here is why:


  • When you navigate your client browser to the remote‘s Chrome port, Developer Tools front-end is being served from the host Chrome as a Web Application from the Web Server.
  • It fetches HTML, JavaScript and CSS files over HTTP
  • Once loaded, Developer Tools establishes a Web Socket connection to its host and starts exchanging JSON messages with it.

In this scenario, you can substitute Developer Tools front-end with your own implementation. Instead of navigating to the HTML page at http://localhost:9222, your application can discover available pages by requesting: http://localhost:9222/json and getting a JSON object with information about inspectable pages along with the WebSocket addresses that you could use in order to start instrumenting them. See the HTTP Endpoints section below for more.


  

chrome.debugger

原文:https://www.cnblogs.com/cbugs/p/10401829.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!