I want to write a Firefox WebExtension that would consist of a button, which would open the Browser Console upon click. How can I achieve that? Is there a URL for the Browser Console which can be used with windows.create() or Window.open()?
Asked
Active
Viewed 348 times
0
-
I don't think it's possible. – Smile4ever Mar 09 '19 at 19:21
-
Maybe it is. I have found the Web Console URL: chrome://devtools/content/webconsole/webconsole.xul – and his dog Mar 09 '19 at 19:31
-
Most chrome:// URLs cannot be opened using WebExtensions tabs.create or windows.create. – Smile4ever Mar 09 '19 at 19:47
-
I have found this: **let HUDService = require("devtools/client/webconsole/hudservice"); HUDService.openBrowserConsoleOrFocus();** Have not tested it yet, but it probably should work from a XUL extension. Is it possible to write such a button directly into the browser's code? Like **browser/content/browser.xul** ? – and his dog Mar 11 '19 at 15:15