How to open the correct devtools console to see output from an extension script?

Your code is correct as written, it works and outputs to console. If you are not seeing it, then you are, probably, looking at the wrong console. 1. Firefox Mozilla describes what extension output can be seen in which console in their Debugging article. Browser Console The Browser Console no longer shows output from WebExtensions … Read more

Accessing console and devtools of extension’s background.js

You’re looking at the wrong place. These console messages do not appear in the web page, but in the invisible background page (ManifestV2) or service worker (ManifestV3). To view the correct console open devtools for the background script’s context: Visit chrome://extensions/ or right-click the extension icon and select “Manage extensions”. Enable developer mode Click on … Read more