Accessing console and devtools of extension's background.js
You're looking at the wrong place. Logged console messages do not appear in the web page, but in the (invisible) background page. To see these messages in the console, follow these steps:
Visit chrome://extensions/
.
You can also right-click the extension icon, then click "Manage extensions".
- Enable developer mode
- Click on the link of your background page (at "Inspect views").
- The developer console opens for this page.
New UI:
Old UI:
I had the same problem, in my case the logging was set to "Hide all" in the console tab in Chrome Developer tools. I had not even realised this was an option, and I can't remember turning it off
For followers who wish to see the debug console for a "content script" of their chrome extension, it is available by doing a normal "show developer console" then use the dropdown arrow to selects its "javascript environment" then you'll have access to its methods, etc.