Debugging web push on iOS from a Mac using Web Inspector

283 Views Asked by At

Web push notifications have come to iOS, great! But they dont work exactly as expected so I would like to debug them.

I know how to debug a web app from a Mac using Web Inspector:

  1. Enable it on the connected device
  2. Connect to the Mac and start the web app on the device
  3. On the Mac Safari / Develop / {Device name} / Safari / {Web app}

To debug web push I instead select Safari / Develop / {Device name} / Service Worker / {Web app} in step 3.

But my break point are not reached and I dont see any logs in the Console. Note that when I click on a notification, then my break point is reached and I see the logs (within the service worker, still) so I know my setup is about right.

So it is like Web Inspector needs a user interaction to be able to instrospect the service worker, is it a bug or a flaw in my setup?

I use ios 16.4.1, Safari 16.4 on my Mac and Firebase FCM

0

There are 0 best solutions below