Q: How do I debug?
A: From a page on the same origin, go to Developer Tools > Application > Service Workers.
You can also use chrome://inspect/#service-workers to find all running service workers.
To poke around at the internals (usually only Chromium developers should need this), visit chrome://serviceworker-internals .
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". Why?
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. This flag must be combined with a --user-data-dir flag. For example:
$ ./chrome --user-data-dir=/tmp/foo --unsafely-treat-insecure-origin-as-secure=http://your.insecure.site
If you want to test on https://localhost with a self-signed certificate, do:
$ ./chrome --allow-insecure-localhost https://localhost
You might also find the --ignore-certificate-errors flag useful.
Q: I made a change to my service worker. How do I reload?
A: From Developer Tools > Application > Service Workers, check "Update on reload" and reload the page.
Q: I have a different question.
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.