Search code examples
javascriptweb-worker

Get a list of running web workers


Is it possible to get an overview of running Javascript Web Workers either with browser console, developer tools or with a command?

I use an external library which uses workers and want to make sure it runs correctly, but I don't know how the worker is called and have no variable pointing to it.


Solution

  • Yes, you can see the list of current workers using the developer tool in Firefox and Chrome (I'm not aware of other browsers).

    In Firefox developer tools, they are in the right hand pane, under the Workers section of the Debugger tab.

    enter image description here

    In Chrome developer tools, they are in the right hand pane, under the Threads section of the Sources tab.

    enter image description here

    You can click on a worker to open up its console and debugger.

    Hope it helps!!