Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No inspect views option on my Chrome extension

I was just experimenting with developing a chrome extension, while I noticed the Inspect views: background page option disappeared off my extension in chrome://extensions:

enter image description here

Note how it shows forAdBlock, but not for my extension 'Facebook Star'. Ideas? My app does not have a window I could right click on, as it just runs in the background, so how could I see it's console and devtools?

I'm running Chrome Version 31.0.1650.63 on lubuntu for all that matters.

like image 877
user1555863 Avatar asked Mar 23 '14 15:03

user1555863


2 Answers

Inspect views are only for background stuff that are independent from any chrome tab.

Since you're only using content scripts the inspect view equivalent is associated with each injected tab. You can access the sandboxed environment of the injected script by going to the console window on the injected tab then selecting the page context of your extension:

enter image description here

like image 193
kbtz Avatar answered Sep 27 '22 03:09

kbtz


Just in case anyone else who ends up here trying to get "Inspect views: background page" to appear had the same problem as me: you need to have "Developer mode" turned on in the top right hand corner of the chrome://extensions pages.

(This wasn't the OP's problem, since we can see in the screenshot that they had it turned on, but this question is one of the top hits if you're trying to figure out how to get that option to appear, so I hope this might help some other people anyway!)

like image 36
Mark Longair Avatar answered Sep 26 '22 03:09

Mark Longair