Bug 34598

Summary: Web Inspector: support for remote debugging
Product: WebKit Reporter: Patrick Mueller <pmuellr>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bweinstein, eostroukhov, jamey.hicks, jchaffraix, joepeck, keishi, leo, pfeldman, pmuellr, rik, robert.colburn+bugzilla
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 77031    

Description Patrick Mueller 2010-02-04 09:01:39 PST
It would be nice to be able to reuse all the Web Inspector stuff to enable debugging a remote web browsing session.  One use case is mobile, for instance, debugging a browser session on an iPhone, Android, Palm, etc sort of device.

The basic idea is that the remote browser would need to have a gesture to enter debug mode, and would need to provide an address to the machine running the debug client which will actually be displaying a Web Inspector window.  Presumably, the debug client is just a WebKit-consuming web browser.  It would need a way to indicate it was willing to accept debug connections (or perhaps connect TO a remote session) from a debug target.  Once connected, Web Inspector would work as it does today for a local window, but be proxying the work to the debug target running remotely.

Discuss.
Comment 1 Timothy Hatcher 2010-02-04 09:14:46 PST
We can use Zeroconf to discover debuggable devices. Not sure a gesture is needed, just a setting would do…
Comment 2 Patrick Mueller 2010-02-04 10:17:08 PST
I'm not up on my ZeroConf stuff; seems like it would be nice to be able to avoid having to coordinate hostname/port #'s in different places.  Just wondering if it's available everywhere.  Is there something shipped in WebKit that already does ZeroConf?

w/r/t gesture, I use that term generically, meaning "provide some mechanism".  I should probably stop doing that.  Having a preference in the browser settings to "enable debug" would be fine.  Kind of heavy handed, especially when flipping that bit involves exiting the browser to run the settings app, blah blah.  Bug survivable for now.  Perhaps eventually we could provide some JavaScript binding to do that as well, so you could run an app in debug mode just by changing the source.  Or perhaps that's quite dangerous :-)
Comment 3 Timothy Hatcher 2010-02-04 10:19:32 PST
Yes Zeroconf (known as Bonjour in Apple land) handles discovery of service addresses and ports based on a service name (like ssh, ftp, http, web-inspector, etc.)
Comment 4 Timothy Hatcher 2010-02-04 10:20:02 PST
No, we don't use Zeroconf/Bonjour in WebKit currently.
Comment 5 Jamey Hicks 2010-02-17 05:41:30 PST
I have a prototype of remote Web Inspector connected to the InspectorBackend via HTTP. 

I did not focus on how to start the debugger but just on the plumbing to connect the front-end HTML/Javascript to the backend, and modifying the javascript to communicate asynchronously with the backend. This prototype was done in Qt 4.6, so the version of webkit is a bit out of date.
Comment 6 Rob Colburn 2012-05-02 14:09:29 PDT
Old bug. Done?
http://www.webkit.org/blog/1620/webkit-remote-debugging/