How to profile web workers in Chrome? How to profile web workers in Chrome? google-chrome google-chrome

How to profile web workers in Chrome?


To profile Web Workers navigate to "Developer Tools -> Sources -> Workers" and enable the checkbox "Pause on start". Now, when you refresh the page, a popup window with an inspector for each worker will appear.

In the inspector window navigate to the "Profiles" tab and start your profiling. Now you have to switch back to the "Sources" tab and click the "Resume script executing" icon on the right-top icon bar.

This approach is not working for some older Chrome versions (Chrome 33 and below, compare Chromium Issue 180377) - there the inspector windows stay blank, except having a URL in the address bar. In Chrome 35 it is working for me.


It appears that in newer versions of Chrome the Workers tab (in the debugger, nested in the "Sources" tab, on the right) has been merged into a "Threads" tab. I'm using Chrome Version 39.0.2171.95 m (up to date as of December 23, 2014).