Open auchenberg opened 9 years ago
I've been researching this some to see how doable it is.
It would be really cool if we could get it so that the python "ponyd" application wasn't needed. Right now it pretty much just links the iOS App and the Developer Tools, acting kind of like a man-in-the-middle. To do this we would need to somehow implement something in Chrome DevTools to take care of it. Maybe we implement the mDNS in the Chrome Dev tools? It would be nice if there was some type of standard.
The JSON endpoints chrome gives are nice, but it doesn't really work when we are connecting to an IOS device since it doesn't really have a ip/port.
Indeed. For now we would need ponyd
to act as an "protocol adaptor" between iOS and Chrome DevTools. I already done some experimentation with mDNS for node-inspector
where the device is announced over MDNS. See here https://github.com/node-inspector/node-inspector/pull/515
I think the MDNS meta-data could be much simpler with a device name, device type, and a URL to the JSON-endpoint, which a given client then can fetch and extract. This way we wouldn't leak data over MDNS and we could add some auth on the JSON endpoint, if needed.
Thoughts?
Sounds good. I'll see if I can make PonyDebugger / ponyd give a JSON endpoint.
I see that you did the work with node-inspector so it exposes the JSON endpoint over MDNS
Have you done any work to have Chrome DevTools app to consume these separate endpoints in a fluid way?
That be really cool! A JSON endpoint could potentially make it work with https://devtoolsremote.com too.
Yup, there's a branch where a crude MDNS discoverer is implemented. Here's the commit https://github.com/auchenberg/chrome-devtools-app/commit/8429c4b9623f5afcc835d60fe05dee97154b9f4b
The Chrome HTTP/JSON interface is somewhat documented here https://github.com/buggerjs/bugger-daemon#api
@Derimagia I did a rough draft of a potential mDNS spec: https://github.com/RemoteDebug/remotedebug-mdns-spec
Thoughts?
Very nice. Thanks for drafting that. I'll try to take a look at this this weekend.
I've been slightly avoiding doing it because there are a lot of issues with pybonjour in this project so far that haven't been fixed in months which makes it difficult to event get the python app running on macs, but I'll see what I can do.
Alrighty, that sounds a bit more important then this experiment, so no rush :)
I just released Chrome DevTools App, which is a standalone version of Chrome DevTools, independent of Chrome.
I imagine we could make it possible for PonyDebugger to use Chrome DevTools app, as the front-end instead of hosting it's own version?
We could also explore how to make the PonyDebugger endpoint discoverable by Chrome DevTools App, as I understand PonyDebugger already is using mDNS for endpoint discoverability, right?
How about that?