官网:
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:
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.
原文:https://www.cnblogs.com/cbugs/p/10401829.html