[ANN] Multiple simultaneous clients for a single remote web inspector server

256 views
Skip to first unread message

Thomas Aylott

unread,
May 9, 2012, 3:10:16 AM5/9/12
to google-chrome-...@googlegroups.com
Multiplexing WebSocket Proxy allows you to use multiple remote web inspector clients with the same browser tab at the same time.


# install the proxy server
npm install ws-multi-proxy

# launch the basic proxy server
node ./node_modules/ws-multi-proxy/index.js 9023 &

# launch a browser with remote webkit inspector server enabled
open -a "Google Chrome Canary" --args --remote-debugging-port=9222 --user-data-dir="$TMPDIR/.chrome-user-data" about:blank

# find available debugger sockets
curl -s "http://localhost:9222/json"|grep webSocketDebuggerUrl|cut -d'"' -f4

# inspector client 1

# inspector client 2

# inspector client 3

etc…

The Elements panel only really seems to work completely with one client at a time. Everything else seems to work just fine.

I plan to create multiple tools that use the web inspector socket API.
This proxy thing will make it possible to use multiple tools at once.

Enjoy.

Paul Irish

unread,
May 9, 2012, 3:27:46 AM5/9/12
to Thomas Aylott, google-chrome-...@googlegroups.com
Very cool. Thanks for sharing this nice work. :)

John J Barton

unread,
May 9, 2012, 10:55:31 AM5/9/12
to Thomas Aylott, google-chrome-...@googlegroups.com
I am curious as to why you would want a second client on the same tab?
Are you planning to proxy outside of the locahost?
jjb

On Wed, May 9, 2012 at 12:10 AM, Thomas Aylott
<tho...@subtlegradient.com> wrote:

Thomas Aylott

unread,
May 9, 2012, 4:48:09 PM5/9/12
to google-chrome-...@googlegroups.com, Thomas Aylott
I'm working on many small focused tools that will use the same web socket connection.
It was really annoying to be able to use only a single tool at a time.

There's no official plugin/extension mechanism for extending the devtools_frontend yet (afaict).
Some of the stuff I want to do doesn't really make sense to hack into the devtools_frontend code itself anyway.

That was the original reasoning anyway.

John J Barton

unread,
May 9, 2012, 5:00:22 PM5/9/12
to Thomas Aylott, google-chrome-...@googlegroups.com
On Wed, May 9, 2012 at 1:48 PM, Thomas Aylott <tho...@subtlegradient.com> wrote:
> I'm working on many small focused tools that will use the same web socket
> connection.
> It was really annoying to be able to use only a single tool at a time.
>
> There's no official plugin/extension mechanism for extending the
> devtools_frontend yet (afaict).

I guess you mean: "the chrome.devtools extension mechanism:
https://code.google.com/chrome/extensions/trunk/devtools.html
does not support access to the debug protocol"? If yes, then I've
worked on that:
http://code.google.com/p/chromium/issues/detail?id=125036

jjb
Reply all
Reply to author
Forward
0 new messages