question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running Workbox in DEBUG mode

See original GitHub issue

Is there an option or a way to run service-worker (generated by workbox) in debug mode?

It seems like workbox checks process.env.NODE_ENV !== 'production' before logging any debug messages

…and we currently only run WorkboxWebpackPlugin when isEnvProduction is true.

Is this intentional, if not what will the best way to give developers a way to debug their service-worker?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

4reactions
ZYinMDcommented, Apr 7, 2021

The author of the pwa template answered in cra-template/pwa#15 that it can’t be easily done. I think it’ll be tremendously helpful if CRA can add this option as an environmental variable in .env.

Here is the doc page about the debugging mode, which seems not applicable to CRA.

0reactions
stale[bot]commented, Jan 9, 2022

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting and logging - Chrome Developers
Fortunately, just as Workbox makes service worker development easier, it also makes debugging easier through its informative logging.
Read more >
workbox: Set debug mode dynamically - Stack Overflow
Opening the cache and set the debug value using the stored variable. the problem is everything is async and install event is getting...
Read more >
Workbox: your high-level service worker toolkit - web.dev
Workbox is a high-level service worker toolkit built on top of the Service Worker and Cache Storage APIs. It provides a production-ready set ......
Read more >
View the Service Worker and the Cache, and Debug a PWA ...
[00:37] In production or when you really run into cache issues, make sure to close any and all tabs that are open to...
Read more >
Debugging Service Workers in Safari - Progressive Web App ...
Have you ever seen the dreaded "service worker can't load its script" error? Do you wonder why your caches don't seem to work?...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found