To view console while debugging your chrome extension, you should use the chrome.extension.getBackgroundPage();
API, after that you can use console.log()
as usual:
chrome.extension.getBackgroundPage().console.log('Testing');
This is good when you use multiple time, so for that you create custom function:
const console = {
log: (info) => chrome.extension.getBackgroundPage().console.log(info),
};
console.log("foo");
you only use console.log('learnin')
everywhere