Reputation: 467
I'm debugging an extension. Having to go to chrome://extensions, looking for your extension and clicking on "background page" every time you reload it gets annoying real quick.
Is there any shortcut to opening a specific extension's Developer Tools window?
I tried going to:
Upvotes: 2
Views: 1564
Reputation: 73616
When editing only the background page scripts, there's no need to reload the entire extension.
Simply keep the devtools open and reload the background page by pressing F5 key inside.
As for programmatic invocation of the background page, chrome.developerPrivate.openDevTools is showcased in Chrome Apps & Extensions Developer Tool app. Theoretically, you can make your own simple app (with like 10 lines of code) that reloads the extension and reopens its background page.
It requires whitelisting the app id and I'm not sure it'll work in this particular case (my quick test failed in the end even though whitelisting helped remove the permission error shown upon installation).
Upvotes: 3
Reputation: 679
There seems to be no direct way. If you really wanna, I'd suggest adding an event listener to every open tab-- listening for your desired hotkey. If it fires you open the extensions tab and generate a click event on the "background page" element.
That window is opened by what seems to be a call to chrome.developerPrivate.openDevTools
If you try to call that from your background page or any web page other than chrome://extensions/ you'll learn that chrome.developerPrivate is undefined. It's supposedly available only in the devtools console and specifically whitelisted apps.
Found this kind of late: Chrome extension: how to programmatically inspect extension's background page
Upvotes: 0
Reputation: 15647
Perhaps you can use the "Chrome Apps & Extensions Developer Toolbar" tool which is available in the webstore at the below URL.
Features include,
Hope this helps!
Upvotes: 1