What is Service Worker Console? & Where is it in Chrome Browser?
Solution 1
Go to chrome://serviceworker-internals
Choose any service worker and start it if not already started.
Click on Inspect!!
Boom! You have the console there!
Solution 2
If a page has a service worker, then that service worker's logs show in that page's JavaScript console. You can see the source of a log line on the right-hand side of the log:
In the console, there is a select box to select the JavaScript context. This defaults to top
(which means "show everything"), but you can select a more specific context for just the service worker:
![Saugat Bhattarai](https://lh4.googleusercontent.com/-SvXFYuGm73w/AAAAAAAAAAI/AAAAAAAAAQM/nKywafQtA1c/photo.jpg?sz=256)
Saugat Bhattarai
I’m Saugat Bhattarai, a web developer and machine learning enthusiast living in Kathmandu. Currently, I am working on RealTime Vehicle Tracking and Recognition, a Computer Vision Project at Inspiring Lab Pvt. Lab.
Updated on June 07, 2022Comments
-
Saugat Bhattarai about 2 years
I am working on push notifications and came upon an unfamiliar term:
service worker console.
I have read and used the term
console log
orweb console
in browser, but I am not familier with the termservice worker console
, and I didn't find appropriate answer after googling it.Can anyone explain what is
service worker console
? How to access it in Google Chrome? -
Saugat Bhattarai almost 8 yearsThank you very much you have solved my head ache. Can you further guide me in my project web pusher if you have time.
-
Dhruv Batheja almost 8 yearsYeah sure @SaugatBhattarai :). Keep posting whatever doubts you come across!
-
Saugat Bhattarai almost 8 yearsDo you have any idea about how to get unique identification of browser? I need to push message to unique browser. I am confused how to do it.
-
Nuruddin Iminokhunov almost 6 yearsAny idea why inspect shows empty logs even though service worker status is active, and running?
-
Dhruv Batheja almost 6 yearsAre you sure you're
console.log
-ing something when your events fire? @NuruddinIminokhunov -
jameshfisher over 4 years
chrome://serviceworker-internals
is old, and being replaced by the standard dev tools. -
Charly over 3 yearsHello, in a recent Chrome version : chrome://inspect/#service-workers