6

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 ?

2 Answers 2

6

There is now an option to enable debugging of workers in FireFox 43:

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

Where is/was this option?
@Newbyte It was in the settings panel. Looks like worker debugging is enabled by default and the option was removed. Worker code should now show up in the debugger automatically, but I couldn't get it to work. For me, the workers don't show up. Source: developer.mozilla.org/en-US/docs/Tools/Debugger/…
3

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

FF dev 101, workers debugging

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.