Reputation: 91
This might seem like a very silly question, but how can i get the UI for the worker thread, containing the javascript like in chrome, you get a URL for the worker thread when debugging, for firefox ? I can't see this on firebug or the default debugging tool on firefix. I feel like i'm missing something obvious. Can someone please help me out here ?
Upvotes: 6
Views: 7383
Reputation: 10002
In Firefox 100 and probably later you should be able to debug live workers via debugging page:
about:debugging#/runtime/this-firefox
Just click on the "Inspect" button (beside the worker you want to debug). The button should open devtools for that worker.
Note that you might need to refresh the page you are trying to debug. Stopped workers will not be available there. As you can see on the screen below I can only debug (inspect) 2 of 3 workers.
A request to add inspect button in DevTools is here: https://bugzilla.mozilla.org/show_bug.cgi?id=1695114
BTW. If you do something like console.log('[sw.fetch]', 'cached and ok', response);
you will not see this in main devtools. At least not in FF 101.0.
Upvotes: 3
Reputation: 29916
There is now an option to enable debugging of workers in FireFox 43:
Upvotes: 6