I included this in my chrome extension manifest
\"devtools_page\": \"devtools.html\"
And in devtools.html I include a devtools.js file which c
Another way to do it is to open the chrome devtools in a separate window (not on the side of the browser) and then press CMD + Shift + i
(for Mac) and then you get another devtools for that devtools. There you can debug and see console logs easier :)
This message will be logged in the console of the developer tools. To view this console, detach the developer tools from the window, and press Ctrl + Shift + J.
Here's an picture:
1. Page (http://host/)
2. + Devtools instance for http://host
3. + Devtools instance for chrome-devtools://devtools/devtools.html?... )
Your message is currently logged to 3 (the console of the devtools instance) instead of 2 (the console of the page). To log the string to the page, use the chrome.experimental.devtools.console API.
An alternative is to JSON-serialize your object, and use chrome.devtools.inspectedWindow.eval to log the result:
var obj = ...;
var str = JSON.stringify( obj );
chrome.devtools.inspectedWindow.eval('console.log(' + str + ');');