<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:MyriadSet-Text;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Joseph,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I came across this bit of documentation shortly after sending my first mail:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><a href="https://www.webkit.org/blog/?p=1875&preview=true">https://www.webkit.org/blog/?p=1875&preview=true</a>. (Running WebSocket server in your port)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Which if it’s still accurate, then it explains why I didn’t find any listening code, since it says:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif";color:#333333;background:white">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana","sans-serif";color:#333333;background:white"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">However your response leads me to believe that it could be as easy as enabling a define? Searching my code for
</span>INSPECTOR_SERVER <span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
I only find it in </span><span style="font-size:9.0pt;font-family:Consolas;color:#1E1E1E;background:white;mso-highlight:white">FeatureDefinesNix.h</span><span style="font-size:9.0pt;font-family:Consolas;color:#1E1E1E">
</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">but no source code wrapped by it.
</span>REMOTE_INSPECTOR <span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Chris<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> Joseph Pecoraro [mailto:pecoraro@apple.com]
<br>
<b>Sent:</b> Friday, June 20, 2014 5:37 PM<br>
<b>To:</b> Vienneau, Christopher<br>
<b>Cc:</b> webkit-dev@lists.webkit.org<br>
<b>Subject:</b> Re: [webkit-dev] WebKit Remote Web Inspector<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hello,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Yes, this is possible. There are currently two paths to making Web Inspector work across processes.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">1. ENABLE(INSPECTOR_SERVER)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Pros:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> - easy to implement and setup<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> - a compatible web inspector frontend is downloaded on demand, so it should be guarenteed to work<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> - debugger could just be another web browser (you will get best results when that other browser is a WebKit based browser)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Cons:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> - pull based, debugger needs to fetch an updated listing<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> - frontend features can be limited when run in a generic web environment (non-native context menus, no copy/paste, no system beep, etc)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">2. ENABLE(REMOTE_INSPECTOR)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Pros:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> - push based. As WebViews are created, destroyed, or change, they can advertise updates to debuggers<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> - using XPC the middleman process can check privileges of each side<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Cons:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> - frontend is not downloaded, so it requires having a debugger process with a frontend that will work with whatever it is connected to<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> - not implemented in other ports, would take port specific work to get this path up and running in other ports<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">What port are you working on?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">- Joe<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">On Jun 20, 2014, at 4:11 PM, Vienneau, Christopher <<a href="mailto:cvienneau@ea.com">cvienneau@ea.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Hi,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">I’m investigating the possibility of getting access to the “Web Inspector” UI<span class="apple-converted-space"> </span><a href="http://trac.webkit.org/wiki/WebInspector#no1"><span style="color:#954F72">http://trac.webkit.org/wiki/WebInspector#no1</span></a><span class="apple-converted-space"> </span>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”<span class="apple-converted-space"> </span><a href="http://people.apache.org/~pmuellr/weinre/docs/latest/Home.html"><span style="color:#954F72">http://people.apache.org/~pmuellr/weinre/docs/latest/Home.html</span></a><span class="apple-converted-space"> </span>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”<span class="apple-converted-space"> </span><a href="https://github.com/netease-youdao/hex"><span style="color:#954F72">https://github.com/netease-youdao/hex</span></a><span class="apple-converted-space"> </span>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. <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Thanks<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Chris Vienneau<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"MyriadSet-Text","serif"">_______________________________________________<br>
webkit-dev mailing list<br>
<a href="mailto:webkit-dev@lists.webkit.org"><span style="color:#954F72">webkit-dev@lists.webkit.org</span></a><br>
<a href="https://lists.webkit.org/mailman/listinfo/webkit-dev"><span style="color:#954F72">https://lists.webkit.org/mailman/listinfo/webkit-dev</span></a><o:p></o:p></span></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>