Re: [webkit-dev] WebKit Remote Web Inspector
It appears the project I was looking at had all the webkit2 code removed from it, which is why I didn't find the INSPECTOR_SERVER code defines; looking at the trunk code I see it there (last pulled in October). The port I'm looking at, I believe was originally based off the QT port. When I get a chance to get back to this, I presume I'll be able to bring over the portions of the webkit2 code needed for remote web inspector, but I'll have to spend some time investigating what will work best in this particular case. Thanks for the feedback everyone, it's been very helpful; I'm still fairly new to WebKit so the pointers are much appreciated. Chris -Original Message- From: webkit-dev-boun...@lists.webkit.org [mailto:webkit-dev-boun...@lists.webkit.org] On Behalf Of Sergio Villar Senin Sent: Monday, June 23, 2014 2:07 AM To: webkit-dev@lists.webkit.org Subject: Re: [webkit-dev] WebKit Remote Web Inspector On 21/06/14 03:07, Vienneau, Christopher wrote: > However your response leads me to believe that it could be as easy as > enabling a define? Searching my code for INSPECTOR_SERVER I only find > it in FeatureDefinesNix.hbut no source code wrapped by it. > REMOTE_INSPECTOR does not show up at all. Should I see source using > these defines or do I misunderstand? Im guessing the port being used > here doesnt have the things you mentioned in it; which is Cairo. I > expect the server portion needed to implement isnt too difficult, and > I suppose the other ports could be used as examples. As Joseph mentioned, INSPECTOR_SERVER is likely the way to go for you if you are not using a mac port. As you can see from the list that he sent with the files containing that compiler guard most of the code is totally port independent. Ports just need to implement a couple of stuff to get it working (apart from enabling the guard at build time). Regarding the port, there is no port called "cairo", cairo is just a 2D library used by various ports (gtk, wincairo) to render content. As you mentioned that file, I guess you're using an old check out of WebKit that still contains WebKitNIX which was removed from the tree some time ago. Basically just check what GTK or EFL do and do the same. BR ___ 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
Re: [webkit-dev] WebKit Remote Web Inspector
On 21/06/14 03:07, Vienneau, Christopher wrote: > However your response leads me to believe that it could be as easy as > enabling a define? Searching my code for INSPECTOR_SERVER I only find > it in FeatureDefinesNix.hbut no source code wrapped by it. > REMOTE_INSPECTOR does not show up at all. Should I see source using > these defines or do I misunderstand? Im guessing the port being used > here doesnt have the things you mentioned in it; which is Cairo. I > expect the server portion needed to implement isnt too difficult, and I > suppose the other ports could be used as examples. As Joseph mentioned, INSPECTOR_SERVER is likely the way to go for you if you are not using a mac port. As you can see from the list that he sent with the files containing that compiler guard most of the code is totally port independent. Ports just need to implement a couple of stuff to get it working (apart from enabling the guard at build time). Regarding the port, there is no port called "cairo", cairo is just a 2D library used by various ports (gtk, wincairo) to render content. As you mentioned that file, I guess you're using an old check out of WebKit that still contains WebKitNIX which was removed from the tree some time ago. Basically just check what GTK or EFL do and do the same. BR ___ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev
Re: [webkit-dev] WebKit Remote Web Inspector
> On Jun 20, 2014, at 6:07 PM, Vienneau, Christopher 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:pecor...@apple.com] > Sent: Friday, June 20, 2014 5:37 PM > To: Vienneau, Christopher > Cc: webkit-dev@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 > e
Re: [webkit-dev] WebKit Remote Web Inspector
Hi Joseph, I came across this bit of documentation shortly after sending my first mail: https://www.webkit.org/blog/?p=1875&preview=true. (Running WebSocket server in your port) Which if it's still accurate, then it explains why I didn't find any listening code, since it says: In order to use the default Web Inspector front-end for the remote debugging of your WebKit port, you need to implement a small web server supporting the WebSocket specification. We did not make this server code a part of the WebCore because it is up to the embedder to be listening for external connections and discover the inspectable pages. However your response leads me to believe that it could be as easy as enabling a define? 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. 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:pecor...@apple.com] Sent: Friday, June 20, 2014 5:37 PM To: Vienneau, Christopher Cc: webkit-dev@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 mailto: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@
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 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
[webkit-dev] WebKit Remote Web Inspector
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