Q: How do I tell if it is "working"?
A: If you expect a ServiceWorker to be running, chrome://inspect/#service-workers ; otherwise chrome://serviceworker-internals to see the registrations. If there are none, they will be empty.
Q: How do I debug?
A: chrome://inspect/#service-workers . If you need to debug the event listener wire-up use chrome://serviceworker-internals .
There are some newer advanced debugging techniques described below.
Q: When I have Developer Tools open, requests go straight to the network; the Service Worker does not get a fetch event.
A: On the Developer Tools' Network tab, if Disable cache is checked, requests will go to the network instead of the Service Worker. Uncheck that.
Q: I get an error message about "Only secure origins are allowed"
A: Service Workers are only available to "secure origins" (HTTPS sites, basically) in line with a policy to prefer secure origins for powerful new features. However http://localhost is also considered a secure origin, so if you can, developing on localhost is an easy way to avoid this error.
You can also use the --unsafely-treat-insecure-origin-as-secure command-line flag. For example:
$ ./chrome --user-data-dir=/tmp/foo --unsafely-treat-insecure-origin-as-secure=http://your.insecure.site
Alternatively, you might find the --ignore-certificate-errors flag useful.
Q: What are those buttons on chrome://serviceworker-internals?
A: This page shows your registered workers and provides some basic operations.
Unregister: Unregisters the worker.
Start: Starts the worker. This would happen automatically when you navigate to a page in the worker's scope.
Stop: Stops the worker.
Sync: Dispatches a 'sync' event to the worker. If you don't handle this event, nothing will happen.
Push: Dispatches a 'push' event to the worker. If you don't handle this event, nothing will happen.
Inspect: Opens the worker in the Inspector.
Q: I made a change to my service worker. How do I reload?
A: See the "development flow" section of the getting started page for our recommendation.
Q: I have a different question.
A: Leave a comment here or reach us out via blink-dev with Service Worker in the subject of your email.
Chrome 44 required, but no experiments needed. Debugging message flow using conventional breakpoint debugging on both ends (page and the sw). You can kill the worker to debug its installation, you can debug the way it serves resources, etc.
This experiment unlocks a view in Resources just like you asked.
Currently, to view network activity of the worker, click the "inspect" from Resources to launch a dedicated devtools window for the worker itself.