Hello,

Yes, this is possible. There are currently two paths to making Web Inspector 
work across processes.


1. ENABLE(INSPECTOR_SERVER)

Currently enabled by GTK and EFL. The UIProcess process establishes an HTTP 
Web/WebSocket server. The index page is a listing page which advertises 
information about each of the different WebViews that can be inspected. For 
each of these there is a page which fetches the HTML web inspector frontend 
assets (WebInspectorUI) and then establishes a WebSocket connection back to the 
UIProcess to send and receive inspector protocol messages.

Pros:
  - easy to implement and setup
  - a compatible web inspector frontend is downloaded on demand, so it should 
be guarenteed to work
  - debugger could just be another web browser (you will get best results when 
that other browser is a WebKit based browser)
Cons:
  - pull based, debugger needs to fetch an updated listing
  - frontend features can be limited when run in a generic web environment 
(non-native context menus, no copy/paste, no system beep, etc)


2. ENABLE(REMOTE_INSPECTOR)

Currently enabled by Mac and iOS. Very port specific right now. Uses XPC to 
communicate to a middleman process that advertising and helps set up 
connections for the inspector protocol messages.

Pros:
  - push based. As WebViews are created, destroyed, or change, they can 
advertise updates to debuggers
  - using XPC the middleman process can check privileges of each side
Cons:
  - frontend is not downloaded, so it requires having a debugger process with a 
frontend that will work with whatever it is connected to
  - not implemented in other ports, would take port specific work to get this 
path up and running in other ports


If this is just something you want to get up and running to make debugging as a 
developer easier, it sounds like ENABLE(INSPECTOR_SERVER) would work well for 
you. Depending on your port, there should be settings for enabling and 
configuring the inspector server (e.g. port # for the server to listen on) and 
it should be easy to get up and running.

What port are you working on?

- Joe

On Jun 20, 2014, at 4:11 PM, Vienneau, Christopher <cvienn...@ea.com> wrote:

> Hi,
>  
> I’m investigating the possibility of getting access to the “Web Inspector” UI 
> http://trac.webkit.org/wiki/WebInspector#no1 remotely via another 
> browser/process.  This is useful when attempting to debug a page on a device 
> that doesn’t have the same screen real estate as your PC, such as a mobile 
> device.  I’m familiar with “Weinre” 
> http://people.apache.org/~pmuellr/weinre/docs/latest/Home.html which offers 
> many of the features of Web Inspector in a fashion that I’m talking about; 
> but some important elements are missing, such as profiling and java script 
> debugging.  I found “heX” https://github.com/netease-youdao/hex is able to do 
> what I want, but I would like to be able to accomplish the same thing from 
> WebKit itself, since the target platform isn’t on the pc.  Searching through 
> the WebKit source code I can’t find any trace of it having the ability to 
> open a listening port to have a debugging client attach. 
>  
> Is such a thing already possible?  The docs, and older mail threads suggested 
> that remote operation was once a goal of Web Inspector, does work continue on 
> this vein? Please offer any suggestions on how this might be accomplished.
>  
> Thanks
>  
> Chris Vienneau
> _______________________________________________
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to