简体   繁体   中英

Web worker debugging in firefox

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 ?

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

在此处输入图像描述

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,工人调试

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM