I am experimenting with chrome extension manifest v3 (on chrome canary) and I can't find any way to debug the service worker script defined in the manifest.json. For manifest v2 there was a link on the chrome://extensions/ page that would open a background page console. Is there any way to view logs in the manifest v3 service worker script?
I am testing with this minimal working example of a manifest v3 service worker extension: https://gist.github.com/dotproto/3a328d6b187621b445499ba503599dc0.
There is nothing mentioned on this debugging page: https://developer.chrome.com/apps/tut_debugging
There is also nothing mentioned on either of the migration guides: https://developer.chrome.com/extensions/migrating_to_manifest_v3 https://developer.chrome.com/extensions/migrating_to_service_workers
Q: How do I debug? A: From a page on the same origin, go to Developer Tools > Application > Service Workers. You can also use chrome://inspect/#service-workers to find all running service workers.
# Background scriptNavigate to the chrome extensions management page at chrome://extensions and ensure developer mode is on. Click the Load Unpacked button and select the broken extension directory. After the extension is loaded, it should have three buttons: Details, Remove and Errors in red letters.
Manifest V3 is an application programming interface (API) that Google will use in its popular browser, Chrome. It currently employs an API called Manifest V2. These Manifest APIs are the systems that govern how Chrome extensions interact with your browser.
The manifest file uses JSON format to describe the important information about the extension. It contains fields that are required and recommended while others are optional depending on the extension you are building. name refers to the name of the extension and should be up to 45 characters.
I guess you are looking for the internal ServiceWorker (backend page) of your extension and their connections.
There are two URLs you should be aware of:
chrome://inspect/#service-workers
chrome://serviceworker-internals/?devtools
chrome://inspect/#service-workers
chrome://serviceworker-internals/?devtools
Option A: From contextmenu
Open your extension panel
Open contextmenu
and select inspect
2nd DevTools instance opens
Option B: From extensions page
Open chrome://extensions
Find your extension click "Details"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With