<p dir="auto">I just follow  <a href="https://github.com/atom/electron/blob/master/docs/tutorial/devtools-extension.md#devtools-extension">DevTools extension</a> document, and when I called below on my electron chrome console</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="require('remote').require('browser-window').addDevToolsExtension('/some-directory/react-devtools')
// return &quot;React Developer Tools&quot;"><pre class="notranslate"><span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'remote'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'browser-window'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">addDevToolsExtension</span><span class="pl-kos">(</span><span class="pl-s">'/some-directory/react-devtools'</span><span class="pl-kos">)</span>
<span class="pl-c">// return "React Developer Tools"</span></pre></div>
<p dir="auto">But I got a TypeError log on terminal:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[1438:0520/120118:ERROR:CONSOLE(74)] &quot;Uncaught TypeError: Cannot read property 'getURL' of undefined&quot;, source: chrome-extension://extension-1/agents/ReactInspectorAgent.js (74)"><pre class="notranslate"><code class="notranslate">[1438:0520/120118:ERROR:CONSOLE(74)] "Uncaught TypeError: Cannot read property 'getURL' of undefined", source: chrome-extension://extension-1/agents/ReactInspectorAgent.js (74)
</code></pre></div>
<p dir="auto">I went through <code class="notranslate">ReactInspectorAgent.js</code> <a href="https://github.com/facebook/react-devtools/blob/master/agents/ReactInspectorAgent.js#L74">line 74</a>:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// agents/ReactInspectorAgent.js
var runtimeURL = chrome.extension.getURL(fileName);"><pre class="notranslate"><span class="pl-c">// agents/ReactInspectorAgent.js</span>
<span class="pl-k">var</span> <span class="pl-s1">runtimeURL</span> <span class="pl-c1">=</span> <span class="pl-s1">chrome</span><span class="pl-kos">.</span><span class="pl-c1">extension</span><span class="pl-kos">.</span><span class="pl-en">getURL</span><span class="pl-kos">(</span><span class="pl-s1">fileName</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">It looks like <code class="notranslate">chrome.extension</code> is <code class="notranslate">undefined</code>, how this could be happened?</p>
<ul dir="auto">
<li>Electron 0.25.1</li>
<li>react-devtools 0.13.1</li>
</ul>
<p dir="auto">you have the documentation<br>
<a href="https://github.com/atom/electron/blob/master/docs/tutorial/devtools-extension.md">https://github.com/atom/electron/blob/master/docs/tutorial/devtools-extension.md</a><br>
It described that can use plug-ins from google chrome, made as described therein, and then get an error</p>
<p dir="auto">Uncaught TypeError: Cannot read property 'getURL' of undefined", source: chrome-extension://extension-1//panes/assets/ember-inspector.js (1)</p>
<p dir="auto">code, a request of this type</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="chrome.extension.getURL(&quot;/panes/ember_debug.js&quot;)"><pre class="notranslate"><code class="notranslate">chrome.extension.getURL("/panes/ember_debug.js")
</code></pre></div>
<p dir="auto">so that the error is not exactly in the plugin, as it is normal in the google chrome working</p>