Closed Bug 1209746 Opened 9 years ago Closed 8 years ago

about:debugging items should include item-appropriate metadata

Categories

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

defect

Tracking

(firefox44 affected)

RESOLVED FIXED
Tracking Status
firefox44 --- affected

People

(Reporter: canuckistani, Unassigned)

References

Details

User Story

Service Worker Debugging

Service workers are highly transient in nature, when they are idle, they live for maybe 5 minutes before they are suspended. The proper way to handle service worker debugging is to start with discovery of service workers across all tabs, select the service worker, and give the developer a "button" to "inspect" the service worker, at which point the service worker remains alive so that a developer can inspect AND debug the service worker. 

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 in debugger 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.

From a debugging session inside of a tab: https://bugzilla.mozilla.org/show_bug.cgi?id=1175550

During a debugging session, any registered service workers that are associated with the domain that is open/inspected in the tab should be discoverable alongside the list of regular workers in the debugger. 

If the service worker is not running, it's still in the list, with an option for the developer to inspect it

The SW will then not be suspended or stopped until the toolbox for that tab is closed. (unless of course it's closed via the global list of SW workers, or closed from within the worker.)

Attachments

(1 file)

Service workers tooling in chrome includes some meta-data for each given registered worker, see attached screenshot. This info is pretty useful, and we should consider including it.

For other type of things like devices, apps and addons we should also identify and include similar types of info that would be helpful to developers.

( IMO this is a followup to MVP, not a blocker )
Depends on: about:debugging
This is really a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1209369, we can keep this one open separately but the requirements are really a part of 1209369.
User Story: (updated)
Blocks: 1214248
Blocks: 1209369
Component: Developer Tools → Developer Tools: about:debugging
This is a longer-term bug, so not part of the tools required for Developer Edition 47.
No longer blocks: 1214248
Priority: -- → P2
Depends on: 1257873
The user story has a wider scope than this bug, but almost everything in it was addressed! \o/ Closing as resolved.

User Story ideas that were still missing:

> Each service worker listing includes meta-data about the worker: 
> Start time

I don't think this is useful, but I filed bug 1263892 for it anyway.

> SW type, e.g. push/batch, etc...

I don't think there is an official "SW type", but e.g. for service workers that subscribe to a Push Service, bug 1188981 will show the subscription URL. So we'll have metadata for these particular service workers.

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

This is bug 1215379, out of scope here because it's not metadata.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: