ChromeRepl - a remote REPL client for Google Chrome

2009-11-07 15:50

Today is a little party about Chromium extension at Shibuya. And so I wrote a small extension to learn about Chromium and Google Chrome.

Developer Tools Protocol

Yesterday, I hear about Google Chrome Developer Tools from co-worker. He said “I tried Eclipse debugger but not works well…”. Um, I don’t know Eclipse. Sorry.

However I found a Google Chrome Developer Tools Protocol from Developer Tools page. It’s simple, text based protocol over TCP/IP. User can control Chrome from a remote client.

Protocol

Developer Tools Protocol have some Tools. DevToolsService is not fun, V8Debugger is powerful and interesting, and ExtensionPorts is most flexible. This tool used to talk to a Chrome extension.

How to use ChromeRepl

So I wrote a extension, Ruby client library and script. Repository is chrome-repl.

ChromeRepl is proof-of-concept quality yet. First, launch Chrome with –remote-shell-port and load extension from chrome://extensions/.

% /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-shell-port=9222
...

Second, edit extension ID of chrome-repl script and launch on another console.

% ruby -I lib ./bin/chrome-repl 9222
> 1 + 2
3
> chrome.tabs
{"onRemoved"=>{"listeners_"=>[], "eventName_"=>"tabs.onRemoved"}, "onAttached"=>{"listeners_"=>[], "eventName_"=>"tabs.onAttached"}, "onDetached"=>{"listeners_"=>[], "eventName_"=>"tabs.onDetached"}, "onSelectionChanged"=>{"listeners_"=>[], "eventName_"=>"tabs.onSelectionChanged"}, "onMoved"=>{"listeners_"=>[], "eventName_"=>"tabs.onMoved"}, "onCreated"=>{"listeners_"=>[], "eventName_"=>"tabs.onCreated"}, "onUpdated"=>{"listeners_"=>[], "eventName_"=>"tabs.onUpdated"}}

I’ll make chrome-repl.crx soon. Please wait a moment.

GreaseKit 1.7 released

2009-09-22 22:14

I released GreaseKit 1.7 now. This version fixes a installation problem and adds GM_addStyle and GM_log again. In addition, the “GreaseKit” menu moved to left of the “Window” menu.

So, these modification is based on Jiang Jiang’s patch. Thank you!

GreaseKit 1.6 released

2009-09-16 00:48

Finally, I uploaded the disk image of GreaseKit 1.6 on Google Code. This version works with 64bit applications on Snow Leopard. And fixed some memory leaks by Aaron Zinman.

Sorry for late. Enjoy!

Update

I also updated http://8-p.info/greasekit/.