Better service worker discovery for developers

RESOLVED INVALID

Status

DevTools
about:debugging
P2
normal
RESOLVED INVALID
3 years ago
a month ago

People

(Reporter: Axel Kratel, Unassigned)

Tracking

(Depends on: 2 bugs, Blocks: 2 bugs)

Firefox Tracking Flags

(Not tracked)

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.
(Reporter)

Description

3 years ago
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/.
(Reporter)

Updated

3 years ago
Blocks: 943220
(Reporter)

Comment 1

3 years ago
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 :)
Blocks: 1196785

Comment 3

3 years ago
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.

Comment 4

3 years ago
Note, there is already an "about:serviceworkers" page today, but the plan is to eventually subsume it into "about:debugging".
(Reporter)

Comment 5

3 years ago
(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.
(Reporter)

Updated

3 years ago
Blocks: 1188675
(Reporter)

Comment 6

3 years ago
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)

Updated

3 years ago
No longer blocks: 1196785
Depends on: 1196785
Depends on: 1211017
(Reporter)

Updated

3 years ago
Blocks: 1214248
(Reporter)

Comment 7

3 years ago
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

Comment 8

2 years ago
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

Updated

2 years ago
Mentor: janx
Summary: SW Discovery for developers → Better service worker discovery for developers

Updated

2 years ago
Mentor: janx
Blocks: 1201717
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
Last Resolved: 8 months ago
Resolution: --- → INVALID

Updated

a month ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.