console.log in a service worker doesn't log to the web console but logs to the browser console

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
3 years ago
3 years ago

People

(Reporter: marco, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox43 affected)

Details

Comment hidden (empty)
This is filed under service worker.  Are you doing your console.log() in the SW script?  Are you saying the devtools option to show the output in web console stops working?

A test case would be useful.
Blocks: 1201717
(Reporter)

Comment 2

3 years ago
> Are you doing your console.log() in the SW script?

Yes. I've simply added a console.log() in the fetch event listener.

> Are you saying the devtools option to show the output in web console stops working?

Is there an option to enable console.log() from service workers?
By default it doesn't work for me (logs aren't shown in the web console but are shown in the browser console).

I'm updating the bug title because the restart thing was my mistake.
(Reporter)

Updated

3 years ago
Summary: console.log doesn't log to the web console and logs to the browser console only after restarting Firefox → console.log in a service worker doesn't log to the web console but logs to the browser console
Yes, under the "Logging" sub-tab in the console tab.  Select the Service Worker entry.
(Reporter)

Comment 4

3 years ago
Thank you!
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.