Closed Bug 1209369 Opened 9 years ago Closed 7 years ago

Better service worker discovery for developers

Categories

(DevTools :: about:debugging, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: akratel, Unassigned)

References

(Blocks 2 open bugs)

Details

User Story

From a global discovery list:

(To see how this works in Chrome, use the demo https://people.mozilla.org/~ewong2/push-notification-test/ and then go to: chrome://serviceworker-internals/ to see the list of workers.

Global service worker discovery: a developer should be able to go to a global list of all service workers across all tabs, and be able to see what service workers are registered.

Each service worker listing includes meta-data about the worker: 
Start time
Script path
Scope, i.e. which page/URL registered the SW
Registration metadata
SW type, e.g. push/batch, etc...

For all types of SW, should be able to start, stop, unregister. 

For SW types, additional buttons/functions need to be included:
Push: add a sample push notification test

A developer can select for inspection an SW from the global list

There is an option to check to make sure the SW is paused on start when loaded

When the SW is selected for inspection, the SW automatically loaded/running so it can be inspected and debugged. If the option to pause was checked, the SW is paused in the debugger on load.

An inspection/debugging/console tool box opens (UI? Is that via app manager?) and the developer can now inspect and debug the service worker.

Platform: The SW stays alive as long as the developer is inspecting it and/or debugging it, i.e. until he closes the tool box.
We need a way for developers to discover all registered service workers across all tabs and for developers to be able to inspect/debug and test out these service workers with test pushes. In Chrome this is handled with chrome://serviceworker-internals/.
Blocks: sw-devtools
Jan, is this something we will get with "about:debugger" or can we have a distinct URL just for service workers? Thanks. Please take a look at chrome://serviceworker-internals/. This is needed by dev edition 45 in order to support the Jan release of push notification debugging. Note: should be for all SW, not just push, but push services is one of the main use cases.
I don't want to make something separate from about:debugging, that's the whole point of about:debugging :)
Hi Axel, yes ServiceWorker discovery will be part of what "about:debugging" offers (as well as ServiceWorker-specific features and details, e.g. freeze / kill-on-event / etc, everything you'll need for push notification debugging). It should even land soon (in the coming days), but will remain hidden until stable.
Note, there is already an "about:serviceworkers" page today, but the plan is to eventually subsume it into "about:debugging".
(In reply to Jeff Griffiths (:canuckistani) (:⚡︎) from comment #2) > I don't want to make something separate from about:debugging, that's the > whole point of about:debugging :) Yes, there's no need for a separate page, but we need a tracking bug to make sure SW and for that matter, push is covered in about:debugger. (In reply to Jan Keromnes [:janx] from comment #4) > Note, there is already an "about:serviceworkers" page today, but the plan is > to eventually subsume it into "about:debugging". As long as we have a place where a developer can go to find a registered SW, and can start it, or inspect it (which also starts it), then the requirement is met. And if it's a push SW, there should be a feature similar to Chrome's "Push" button that does a sample push. I am updating the bug Jeff logged to make it the main "push" tracking bug, 1188675.
Blocks: 1188675
The details of the SW discovery are included in this etherpad: https://etherpad.mozilla.org/ServiceWorkerDebugging I've copied the relevant details into the user story field. https://bugzilla.mozilla.org/show_bug.cgi?id=1209746 is really a duplicate, it should be part of this bug.
User Story: (updated)
No longer blocks: about:debugging
Depends on: about:debugging
Depends on: 1211017
Blocks: 1214248
Split this bug into: 1209746 about:debugging items should include item-appropriate metadata 1215379 about:debugging items should include means to pause a worker on service worker load in debugger 1215385 about:debugging once debugging session is started on SW, the SW stays alive/won't be suspended 1215386 about:debugging should provide SW lifecycle mngnt: start, stop, unregister 1209699 about:debugging Push sample test for push service workers
This is a longer-term bug (and mostly fixed by now), so not a part of the tools required for Developer Edition 47.
No longer blocks: 1214248
Priority: -- → P2
Mentor: janx
Summary: SW Discovery for developers → Better service worker discovery for developers
Mentor: janx
Blocks: WADI
Component: Developer Tools → Developer Tools: about:debugging
This bug doesn't seem actionable and has already been split in smaller bugs. Closing.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.