From 4b1e55df2169f0982f7c05224603c3cd76b1ddc1 Mon Sep 17 00:00:00 2001 From: Sam Saccone Date: Mon, 8 Jun 2015 13:53:05 -0400 Subject: [PATCH] :pencil: Language tweaks for readability --- docs/debugger-protocol.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/debugger-protocol.html b/docs/debugger-protocol.html index 323c663..abc4791 100644 --- a/docs/debugger-protocol.html +++ b/docs/debugger-protocol.html @@ -4,8 +4,8 @@

Under the hood, Chrome Developer Tools is a web application written in HTML, JavaScript and CSS. It has a special binding available at JavaScript runtime - that allows interacting with chrome pages and instrumenting them. Interaction - protocol consists of commands that are sent to the page and events that + that allows interacting with chrome pages and instrumenting them. The interaction + protocol consists of commands that are sent to the page, and events that the page is generating. Although Chrome Developer Tools is the primary client of this protocol, including for remote debugging, there are ways for third parties to use it and start instrumenting browser pages explicitly. We will describe the ways it could be @@ -51,14 +51,14 @@ The tip-of-tree protocol is more readable in the debugger protocol viewer.

Sniffing the protocol

-

You can inspect how the Chrome DevTools uses the protocol. Especially handy when looking up newer features. First, run Chrome with the debugging port open:

/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --remote-debugging-port=9222 http://localhost:9222 http://chromium.org
Then, select the Chromium Projects item in the Inspectable Pages list. Now that DevTools is up and fullscreen, open DevTools to inspect it. Cmd-R in the new inspector to make the first restart. Now head to Network Panel, filter by Websocket, select the connection and click the Frames tab. Now you can easily see the frames of WebSocket activity as you use the first instance of the DevTools.

+

You can inspect how the Chrome DevTools uses the protocol. This is especially handy when looking up newer features. First, run Chrome with the debugging port open:

/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --remote-debugging-port=9222 http://localhost:9222 http://chromium.org
Then, select the Chromium Projects item in the Inspectable Pages list. Now that DevTools is up and fullscreen, open DevTools to inspect it. Cmd-R in the new inspector to make the first restart. Now head to Network Panel, filter by Websocket, select the connection and click the Frames tab. Now you can easily see the frames of WebSocket activity as you use the first instance of the DevTools.

Sniffing the debugger protocol

Debugging over the wire

-

Today Developer Tools front-end can attach to a remotely running Chrome +

The Developer Tools front-end can attach to a remotely running Chrome instance for debugging. For this scenario to work, you should start your @@ -74,11 +74,11 @@

     chrome.exe --user-data-dir=<some directory>
-

And now you can navigate to the given port from your client and attach to +

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 Developer Tools interface identical to the embedded one and +

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

@@ -169,7 +169,7 @@

Simultaneous protocol clients

- We currently do not support multiple clients connected to the protocol simultaneously. That includes the DevTools opening while another client is connected. On the bug tracker, crbug.com/129539 follows the issue; you can star it for email updates. + We currently do not support multiple clients connected to the protocol simultaneously. This includes opening DevTools while another client is connected. On the bug tracker, crbug.com/129539 follows the issue; you can star it for email updates.

Upon disconnnection, the outgoing client will receive a detached event. For example: {"method":"Inspector.detached","params":{"reason":"replaced_with_devtools"}}. View the enum of possible reasons. (For reference: the original patch). After disconnection, some apps have chosen to pause their state and offer a reconnect button.