8

I needed to debug a PWA that throws an error only when running in standalone mode, this PWA worked fine on the same device but when opened from Google Chrome directly.

I was debugging this web app by connecting from the desktop's Chrome developer tools with USB debugging enabled, but this was quite slow, as I had to build the PWA and publish it to be able to check the changes that I've made because this error was not thrown in development mode (The app is built using Nuxt.js).

That error was related to a code that checks if the web app is running in standalone mode:

window.matchMedia('(display-mode: standalone)').matches

I have resolved the issue but is there a way to simulate this display-mode: standalone from Google Chrome on the desktop?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Pierre
  • 12,468
  • 6
  • 44
  • 63

0 Answers0