<ul dir="auto">
<li><strong>Electron Version:</strong><br>
4.0.2</li>
<li><strong>Operating System:</strong><br>
mac 10.14</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto"><a href="https://electronjs.org/docs/api/web-contents#contentssetdevtoolswebcontentsdevtoolswebcontents" rel="nofollow">sample code</a> doesn't work. the dev tool shows, but it's empty.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;html&gt;
&lt;head&gt;
  &lt;style type=&quot;text/css&quot;&gt;
    * { margin: 0; }
    #browser { height: 70%; }
    #devtools { height: 30%; }
  &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;webview id=&quot;browser&quot; src=&quot;https://github.com&quot;&gt;&lt;/webview&gt;
  &lt;webview id=&quot;devtools&quot;&gt;&lt;/webview&gt;
  &lt;script&gt;
    const browserView = document.getElementById('browser')
    const devtoolsView = document.getElementById('devtools')
    browserView.addEventListener('dom-ready', () =&gt; {
      const browser = browserView.getWebContents()
      browser.setDevToolsWebContents(devtoolsView.getWebContents())
      browser.openDevTools()
    })
  &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;"><pre class="notranslate"><code class="notranslate">&lt;html&gt;
&lt;head&gt;
  &lt;style type="text/css"&gt;
    * { margin: 0; }
    #browser { height: 70%; }
    #devtools { height: 30%; }
  &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;webview id="browser" src="https://github.com"&gt;&lt;/webview&gt;
  &lt;webview id="devtools"&gt;&lt;/webview&gt;
  &lt;script&gt;
    const browserView = document.getElementById('browser')
    const devtoolsView = document.getElementById('devtools')
    browserView.addEventListener('dom-ready', () =&gt; {
      const browser = browserView.getWebContents()
      browser.setDevToolsWebContents(devtoolsView.getWebContents())
      browser.openDevTools()
    })
  &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre></div>
<h3 dir="auto">Screenshots</h3>
<p dir="auto">the dev tools show nothing.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13174059/53564768-b8035180-3b92-11e9-815a-92160a730eef.png"><img src="https://user-images.githubusercontent.com/13174059/53564768-b8035180-3b92-11e9-815a-92160a730eef.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">after remove this line <code class="notranslate">browser.setDevToolsWebContents(devtoolsView.getWebContents())</code>, the devtool can show correctly.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13174059/53565018-4d064a80-3b93-11e9-9d0e-6c56880bd775.png"><img src="https://user-images.githubusercontent.com/13174059/53565018-4d064a80-3b93-11e9-9d0e-6c56880bd775.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">It seems that Chromium disallows using guest view as devtools, I need to find out the code in Chromium to fix it.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="not ok 55 &lt;webview&gt; tag setDevToolsWebContents() API sets webContents of webview as devtools
  AssertionError: expected '' to equal 'InspectorFrontendHostImpl'
      at Context.it (/Users/zcbenz/codes/electron/spec/webview-spec.js:721:26)"><pre class="notranslate"><code class="notranslate">not ok 55 &lt;webview&gt; tag setDevToolsWebContents() API sets webContents of webview as devtools
  AssertionError: expected '' to equal 'InspectorFrontendHostImpl'
      at Context.it (/Users/zcbenz/codes/electron/spec/webview-spec.js:721:26)
</code></pre></div>