<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>197309</bug_id>
          
          <creation_ts>2019-04-26 04:47:21 -0700</creation_ts>
          <short_desc>Uncaught Exception: Uncaught ReferenceError: InspectorFrontendHost is not defined</short_desc>
          <delta_ts>2019-09-13 11:55:06 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.14</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Arpit Jain">me.arpitjain09</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hi</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>joepeck</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1530661</commentid>
    <comment_count>0</comment_count>
    <who name="Arpit Jain">me.arpitjain09</who>
    <bug_when>2019-04-26 04:47:21 -0700</bug_when>
    <thetext>-------
Inspected URL:        (unknown)
Loading completed:    false
Frontend User Agent:  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36

Uncaught Exceptions:
 - Uncaught ReferenceError: InspectorFrontendHost is not defined (at Platform.js:27:11)
    ? @ ReferenceError: InspectorFrontendHost is not defined
    ? @ Platform.js:27:11
 - Uncaught ReferenceError: InspectorFrontendHost is not defined (at LoadLocalizedStrings.js:30:31)
    ? @ ReferenceError: InspectorFrontendHost is not defined
    ? @ LoadLocalizedStrings.js:30:31
    ? @ LoadLocalizedStrings.js:34:3
 - Uncaught ReferenceError: InspectorFrontendHost is not defined (at Setting.js:63:31)
    ? @ ReferenceError: InspectorFrontendHost is not defined
    ? @ Setting.js:63:31)
    ? @ Setting.js:40:44)
    ? @ Setting.js:128:40
 - Uncaught TypeError: Cannot read property &apos;autoLogProtocolMessages&apos; of undefined (at InspectorBackend.js:48:21)
    ? @ TypeError: Cannot read property &apos;autoLogProtocolMessages&apos; of undefined
    ? @ InspectorBackend.js:48:21)
    ? @ InspectorBackend.js:238:20
 - Uncaught ReferenceError: InspectorBackend is not defined (at Connection.js:33:1)
    ? @ ReferenceError: InspectorBackend is not defined
    ? @ Connection.js:33:1
 - Uncaught ReferenceError: InspectorFrontendHost is not defined (at LoadInspectorBackendCommands.js:27:30)
    ? @ ReferenceError: InspectorFrontendHost is not defined
    ? @ LoadInspectorBackendCommands.js:27:30
    ? @ LoadInspectorBackendCommands.js:29:3
 - Uncaught ReferenceError: InspectorFrontendHost is not defined (at Setting.js:63:31)
    ? @ ReferenceError: InspectorFrontendHost is not defined
    ? @ Setting.js:63:31)
    ? @ Setting.js:40:44)
    ? @ Resource.js:1194:36
 - Uncaught TypeError: Cannot read property &apos;name&apos; of undefined (at CodeMirrorAdditions.js:603:27)
    ? @ TypeError: Cannot read property &apos;name&apos; of undefined
    ? @ CodeMirrorAdditions.js:603:27
    ? @ CodeMirrorAdditions.js:644:3
 - Uncaught ReferenceError: InspectorFrontendHost is not defined (at AppController.js:40:20)
    ? @ ReferenceError: InspectorFrontendHost is not defined
    ? @ AppController.js:40:20)
    ? @ AppController.js:33:46)
    ? @ 119258F2245D3CD992093638CEAC68B9:897:24
-------

* STEPS TO REPRODUCE
1. Trying to get devtools frontend to debug websites on iOS Device (using ios_webkit_debug_proxy)
- Git clone
- Open Workspace in XCode 10.2.1 (10E1001)
- File &gt; Workspace Settings &gt;..&gt;... Relative to Workspace
- Build
- Stop the test after build complete
- cd to WebKitBuild⁩ ▸ ⁨WebInspectorUI.build⁩ ▸ ⁨Debug⁩ ▸ ⁨WebInspectorUI.build⁩ ▸ ⁨DerivedSources⁩
- run static file server
- go to localhost:8080/Main.html


* NOTES
Expected to see blank devtools ui
Changing to ?ws=websocket_debug_host to get debug site on safari on iPhone

Building Blink and using inscpector.html works</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1530674</commentid>
    <comment_count>1</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2019-04-26 08:16:51 -0700</bug_when>
    <thetext>If you&apos;re trying to build/run Web Inspector, please follow these instructions &lt;https://trac.webkit.org/wiki/HackingWebInspector&gt;.  You may also find &lt;https://trac.webkit.org/wiki/WebInspectorDebugging&gt; useful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1531078</commentid>
    <comment_count>2</comment_count>
    <who name="Arpit Jain">me.arpitjain09</who>
    <bug_when>2019-04-28 14:15:12 -0700</bug_when>
    <thetext>I tried the steps and got it to build from the CLI.

But I cant actually use it to debug a Safari tab, I expected
- Blank devtools ui
- Adding ?ws=websocket_debug_host to get debug site on safari on iPhone (like in chrome)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1546857</commentid>
    <comment_count>3</comment_count>
    <who name="Arpit Jain">me.arpitjain09</who>
    <bug_when>2019-06-21 05:01:41 -0700</bug_when>
    <thetext>@Devin Rousso any updates</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1546884</commentid>
    <comment_count>4</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2019-06-21 09:17:46 -0700</bug_when>
    <thetext>Loading Web Inspector from a web page is not currently supported.

You need to run your local build of Webkit &lt;https://webkit.org/running-webkit/&gt; and open Web Inspector as you would in Safari (Develop &gt; Show Web Inspector).

If you want to inspect an a page in Safari on iOS:
1. enable Web Inspector on iOS (Settings &gt; Safari &gt; Advanced &gt; Web Inspector)
2. connect your iOS device to your Mac
3. open a page in Safari on your iOS device
4. launch Safari on your Mac (follow the steps in the link above)
5. select Develop &gt; [your device] &gt; [your page in Safari]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1570543</commentid>
    <comment_count>5</comment_count>
    <who name="Arpit Jain">me.arpitjain09</who>
    <bug_when>2019-09-13 03:15:18 -0700</bug_when>
    <thetext>Thee doubts
1. No way to Extract standalone Webkit WebInspector frontend from Webkit sources ?

2. So there is no way to connect to a Safari page on iOS without the step: 
`Dvelop &gt; [your device] &gt; [your page in Safari]` ?

3. No way to utilise ios_webkit_debug_proxy and get the debuggable pages and then debug them in a standalone Safari Tab ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1570654</commentid>
    <comment_count>6</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2019-09-13 11:54:15 -0700</bug_when>
    <thetext>(In reply to Arpit Jain from comment #5)
&gt; Thee doubts
&gt; 1. No way to Extract standalone Webkit WebInspector frontend from Webkit sources ?

You can extract the frontend as you have attempted. But if you are using it, then you must just provide your own &quot;InspectorFrontendHost&quot; global object to fill in the APIs that the Web Inspector frontend uses.

In the past we included a Stub, but we don&apos;t anymore. You could provide your own stub. This is when we removed it:
https://trac.webkit.org/changeset/217924/webkit
https://trac.webkit.org/browser/webkit/trunk/Source/WebInspectorUI/UserInterface/Base/InspectorFrontendHostStub.js?rev=216602


&gt; 2. So there is no way to connect to a Safari page on iOS without the step: 
&gt; `Dvelop &gt; [your device] &gt; [your page in Safari]` ?

Correct. That is the only supported way.

&gt; 3. No way to utilise ios_webkit_debug_proxy and get the debuggable pages and
&gt; then debug them in a standalone Safari Tab ?

Correct. That approach has never been a supported way.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>