Open Bug 1836834 Opened 1 year ago Updated 1 year ago

`console.log` statements do not show up in Service Worker debugger

Categories

(DevTools :: Console, defect, P3)

Firefox 115
defect

Tracking

(Not tracked)

UNCONFIRMED

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:

  1. In Firefox Nightly, enable debugging service workers in about:preferences#experimental.

  2. Go to any site that registers a service worker.

  3. 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 is ServiceWorkerGlobalScope.

  4. Type self.console.log("foobar") or just console.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.

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.

Component: Untriaged → Console
Product: Firefox → DevTools

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.

Severity: -- → S3
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.