Open Bug 1280736 Opened 8 years ago Updated 4 years ago

service workers should report console service messages to debugger popup console

Categories

(Core :: DOM: Service Workers, defect, P5)

defect

Tracking

()

People

(Reporter: bkelly, Unassigned)

References

(Blocks 2 open bugs)

Details

If you debug a service worker script using about:debugging, you will get a new popup window showing the debugger and a console.  Currently service worker console reports do not show up in this console AFAICT.  We should adjust the ServiceWorkerManager::ReportToAllClients() method to include these debugger windows.
Brian or Eddy, didn't this work before? Is this a regression?
Flags: needinfo?(ejpbruel)
Flags: needinfo?(bgrinstead)
This never worked in individual worker windows.  Bug 1259603 is opened to use ConsoleEvents and expose console API messages to the frontend for those windows.  Andrea, I can't remember - what's the plan to get console service messages into the worker thread?
Flags: needinfo?(bgrinstead) → needinfo?(amarchesini)
> windows.  Andrea, I can't remember - what's the plan to get console service
> messages into the worker thread?

We don't have any plan yet. So far we dispatch Console messages generated by the console API.
We should find a way to connect ReportToAllClients to the Console API running in the worker thread.
Flags: needinfo?(amarchesini)
Brian already answered Janx's question. I have nothing more to add.
Flags: needinfo?(ejpbruel)
Priority: -- → P2
(In reply to Andrea Marchesini [:baku] from comment #3)
> > windows.  Andrea, I can't remember - what's the plan to get console service
> > messages into the worker thread?
> 
> We don't have any plan yet.

Has one materialized since you wrote this? :)
Flags: needinfo?(amarchesini)
Brian, do you confirm that the console API use in workers/SharedWorkers/ServiceWorkers is correctly shown in the worker debugger window?
Flags: needinfo?(amarchesini) → needinfo?(bgrinstead)
Sorry for the delay in responding. The console API does not work for Service Workers or any workers when opening a toolbox to target that worker (this depends at least partly on Bug 1259603).  I'm going to be away for a few weeks, but if someone wanted to take over the patch in that bug it should be pretty close to landing - I think Eddy could review that code.  Landing it was held up by a test failure in the newly added test on that patch that I had trouble debugging, but we should at least get an initial landing here with or without that test.
Depends on: 1259603
Flags: needinfo?(bgrinstead)
OK, I'm getting close to having Bug 1259603 ready.  Let's re-purpose this bug for handling console service messages since console API messages will show up after that.
Summary: service workers should report messages to debugger popup console → service workers should report console service messages to debugger popup console
Priority: P2 → P3

Bulk-downgrade of unassigned, untouched DOM/Storage bug's priority.

If you have reason to believe, this is wrong, please write a comment and ni :jstutte.

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