Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inspect WebSockets frames from a Chrome Dev Tools extension

I would like to create a Chrome Developer Tools extension (a new panel) to analyze WebSockets frames on our own websites. As far as I understand, http://developer.chrome.com/extensions/devtools.network.html is not complete enough to give access to WebSockets frames. What are my best options then?

Thanks!

like image 836
Thomas Avatar asked Jun 10 '13 07:06

Thomas


1 Answers

In my personal experience, it is impossible to modify the browser behavior in Chrome, if the addon api does not allow for it - in firefox this is much easier to change as much of the interface logic is written in Javascript, and there are api's for just about anything.

Chrome does support the NPAPI api, however this is written in C++, and the documentation is (best) maintained by Mozilla.

Basically:

  • Stop using Chrome
  • Write your plugin for Firefox https://developer.mozilla.org/en-US/docs/Plugins
  • And hold your breath when you attach the plugin to Chrome.

Your other option is to checkout the source code of Chrome, and attempt to understand it, modify it, and (possibly) get your changes committed back into the tree.

You might be able to get away with just this https://developers.google.com/chrome-developer-tools/docs/contributing

However, again, you are creating a debug version of Chrome.

In summary, there are no easy answers.

like image 112
smaudet Avatar answered Oct 03 '22 07:10

smaudet