`console.log` statements do not show up in Service Worker debugger
Categories
(DevTools :: Console, defect, P3)
Tracking
(Not tracked)
People
(Reporter: dylancutler, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Steps to reproduce:
-
In Firefox Nightly, enable debugging service workers in about:preferences#experimental.
-
Go to any site that registers a service worker.
-
In the Debugger tab, select the service worker, then go to the Console tab. You can verify it's debugging the worker by confirming
self.constructor.name
isServiceWorkerGlobalScope
. -
Type
self.console.log("foobar")
or justconsole.log
and observe that the result is not logged to the developer console.
Actual results:
Nothing is logged to the console except the undefined
returned by the console.log
invocation.
Expected results:
The string passed to console.log
should show up in the developer logs when debugging the service worker.
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Console' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•1 year ago
|
||
We are going to refactor service worker support for the toolbox, and will most likely revisit this at the same time. But this should work in theory, so I will at least test and confirm the issue.
Description
•