[webkit-dev] WebKit Remote Web Inspector
Brady Eidson
beidson at apple.com
Fri Jun 20 22:09:57 PDT 2014
> On Jun 20, 2014, at 6:07 PM, Vienneau, Christopher <cvienneau at ea.com> wrote:
>
> Searching my code for INSPECTOR_SERVER I only find it in FeatureDefinesNix.h but no source code wrapped by it. REMOTE_INSPECTOR does not show up at all.
I wonder what WebKit source you actually have, then!
`grep -r -l "INSPECTOR_SERVER” .`
./WebKit/mac/ChangeLog
./WebKit2/ChangeLog-2012-05-22
./WebKit2/ChangeLog-2013-04-24
./WebKit2/ChangeLog-2013-10-13
./WebKit2/config.h
./WebKit2/UIProcess/efl/WebContextEfl.cpp
./WebKit2/UIProcess/gtk/WebContextGtk.cpp
./WebKit2/UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp
./WebKit2/UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp
./WebKit2/UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp
./WebKit2/UIProcess/InspectorServer/WebInspectorServer.cpp
./WebKit2/UIProcess/InspectorServer/WebInspectorServer.h
./WebKit2/UIProcess/InspectorServer/WebSocketServer.cpp
./WebKit2/UIProcess/InspectorServer/WebSocketServer.h
./WebKit2/UIProcess/InspectorServer/WebSocketServerClient.h
./WebKit2/UIProcess/InspectorServer/WebSocketServerConnection.cpp
./WebKit2/UIProcess/InspectorServer/WebSocketServerConnection.h
./WebKit2/UIProcess/WebInspectorProxy.cpp
./WebKit2/UIProcess/WebInspectorProxy.h
./WebKit2/UIProcess/WebInspectorProxy.messages.in
./WebKit2/UIProcess/WebPageProxy.cpp
./WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp
./WebKit2/WebProcess/WebPage/WebInspector.cpp
./WebKit2/WebProcess/WebPage/WebInspector.h
./WebKit2/WebProcess/WebPage/WebInspector.messages.in
`grep -r -l "REMOTE_INSPECTOR” .`
./JavaScriptCore/API/JSBase.cpp
./JavaScriptCore/API/JSContextRef.cpp
./JavaScriptCore/API/JSObjectRef.cpp
./JavaScriptCore/API/JSValue.mm
./JavaScriptCore/API/JSValueRef.cpp
./JavaScriptCore/ChangeLog
./JavaScriptCore/ChangeLog-2014-02-20
./JavaScriptCore/Configurations/FeatureDefines.xcconfig
./JavaScriptCore/inspector/remote/RemoteInspector.h
./JavaScriptCore/inspector/remote/RemoteInspector.mm
./JavaScriptCore/inspector/remote/RemoteInspectorDebuggable.cpp
./JavaScriptCore/inspector/remote/RemoteInspectorDebuggable.h
./JavaScriptCore/inspector/remote/RemoteInspectorDebuggableConnection.h
./JavaScriptCore/inspector/remote/RemoteInspectorDebuggableConnection.mm
./JavaScriptCore/inspector/remote/RemoteInspectorXPCConnection.h
./JavaScriptCore/inspector/remote/RemoteInspectorXPCConnection.mm
./JavaScriptCore/runtime/JSGlobalObject.cpp
./JavaScriptCore/runtime/JSGlobalObject.h
./JavaScriptCore/runtime/JSGlobalObjectDebuggable.cpp
./JavaScriptCore/runtime/JSGlobalObjectDebuggable.h
./WebCore/bindings/js/JSDOMGlobalObject.cpp
./WebCore/ChangeLog
./WebCore/ChangeLog-2014-02-20
./WebCore/Configurations/FeatureDefines.xcconfig
./WebCore/inspector/InspectorController.cpp
./WebCore/inspector/InspectorController.h
./WebCore/loader/FrameLoader.cpp
./WebCore/page/Page.cpp
./WebCore/page/Page.h
./WebCore/page/PageDebuggable.cpp
./WebCore/page/PageDebuggable.h
./WebCore/WebCore.exp.in
./WebKit/cf/ChangeLog
./WebKit/ChangeLog
./WebKit/ios/ChangeLog
./WebKit/mac/ChangeLog
./WebKit/mac/Configurations/FeatureDefines.xcconfig
./WebKit/mac/WebView/WebIndicateLayer.h
./WebKit/mac/WebView/WebIndicateLayer.mm
./WebKit/mac/WebView/WebPreferenceKeysPrivate.h
./WebKit/mac/WebView/WebView.mm
./WebKit/mac/WebView/WebViewData.h
./WebKit/mac/WebView/WebViewData.mm
./WebKit/mac/WebView/WebViewPrivate.h
./WebKit2/ChangeLog
./WebKit2/ChangeLog-2014-02-20
./WebKit2/Configurations/FeatureDefines.xcconfig
./WebKit2/Shared/WebPageCreationParameters.cpp
./WebKit2/Shared/WebPageCreationParameters.h
./WebKit2/UIProcess/API/C/WKPage.cpp
./WebKit2/UIProcess/API/Cocoa/WKWebView.mm
./WebKit2/UIProcess/WebContext.cpp
./WebKit2/UIProcess/WebPageProxy.cpp
./WebKit2/UIProcess/WebPageProxy.h
./WebKit2/WebProcess/WebPage/WebPage.cpp
./WebKit2/WebProcess/WebPage/WebPage.h
./WebKit2/WebProcess/WebPage/WebPage.messages.in
./WebKit2/WebProcess/WebProcess.cpp
./WTF/ChangeLog
./WTF/wtf/FeatureDefines.h
Thanks,
~Brady
> Should I see source using these defines or do I misunderstand? I’m guessing the port being used here doesn’t have the things you mentioned in it; which is “Cairo”. I expect the server portion needed to implement isn’t too difficult, and I suppose the other ports could be used as examples.
>
> Chris
>
>
> From: Joseph Pecoraro [mailto:pecoraro at apple.com]
> Sent: Friday, June 20, 2014 5:37 PM
> To: Vienneau, Christopher
> Cc: webkit-dev at lists.webkit.org
> Subject: Re: [webkit-dev] WebKit Remote Web Inspector
>
> 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 <cvienneau at 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 at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20140620/bd1d2120/attachment.html>
More information about the webkit-dev
mailing list