Accessing console and devtools of extension’s `background` script

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:

  1. Visit chrome://extensions/ or right-click the extension icon and select “Manage extensions”.
  2. Enable developer mode
  3. Click on the link named background page (ManifestV2) or service worker (ManifestV3).

Screenshot for ManifestV2 extensions:

enter image description here

enter image description here

Screenshot for ManifestV3 extensions:

enter image description here

Leave a Comment

tech