Reputation: 79339
I'm trying to debug a Chrome Extension but every time I refresh it, the developer tools window that is associated with the extension closes. Does anyone know if there is a way to keep it open?
Here's what I'm doing: I click the extension button, which opens a popup window. I then right click it and click "Inspect". That opens the Developer Tools. Now if I click the extension button again to refresh it (when I update code), the Developer Tools closes. :(
Upvotes: 34
Views: 12233
Reputation: 2150
There are two ways to accomplish this.
chrome-extension://extensionid/path/to/popup.html
on a separate tab on Chrome. From there, you can inspect element, and refreshing the file will not cause Dev Tools to close.Upvotes: 67
Reputation: 3838
Dev Tools are closing because hosted page is closing (the popup). The view and it's logic stops working if you close the popup so there's nothing to inspect.
If you'd like to debug background page it will not close with the popup since it is running in background. That's all you can do.
Upvotes: 0