/dev tips

🎊   The Modern DevTools course has now started! Visit ModernDevTools.com to find out more   🎊

(88) CPU Throttling Debug ES6 and ES7 with Source Maps (90)

Chrome DevTools: Use the Threads pane to debug multiple JavaScript threads

7 Jan 2016
Use the Threads pane to debug multiple JavaScript threads

If you're using JavaScript features which makes use of multiple threads, such as Service Workers or Web Workers, the Sources Panel takes this into account.

Since each thread has its own global script context, you can select a specific thread to debug (to set a breakpoint on for example). Just open up the 'Threads' pane in the Sources Panel. You should see the main thread and any others which are available.

You can try a demo here html5demos.com/worker

Sign up to receive a developer tip, in the form of a gif, in your inbox each week.