With manifest v3 the service workers become inactive after few seconds, but they stay active for a long time if devtools is opened (way beyond 5 minutes).
I need to test how my extension handles its active/inactive cycles. How can I force it to become inactive while devtools is opened?
(can't use devtools persistent logs for action popup, because it's being cleared each time)
Application
tab, then Service Worker
on the left.Stop
and Start
to control the background script. You can also debug it and set breakpoints in this devtools.
If your extension doesn't have any page, open any file in a tab e.g. chrome-extension://ID/manifest.json
where ID is the id of your extension. A quick method of doing it is to right-click any file of your extension in devtools Sources panel, then choose "Open in new tab".