Reputation: 5854
I have a devtools.html file that has a script.js which contains:
console.log('started...')
In manifest.json, I have:
"devtools_page": "devtools.html"
However, when I run my extension and open a DevTools window, I don't see the log. If I throw
an error in script.js, I can see that the error occurred in the chrome://extensions
page, so I know that this script is loaded. However, that log doesn't appear anywhere. Aren't a devtools page's logs supposed to appear in the DevTools window?
Upvotes: 2
Views: 1435
Reputation: 73816
console.log()
messagesconst foo = {bar: 123};
chrome.devtools.inspectedWindow.eval(`console.log(${JSON.stringify(foo)})`);
Upvotes: 5