Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is `threads` in the source panel

Today I encountered threads section under Watch and Call stack sections in Sources panel. Now I'm trying to find it and it's not there. What is it for? Why is not shown for all websites?

like image 741
Max Koretskyi Avatar asked Apr 07 '16 17:04

Max Koretskyi


People also ask

Is a Chrome tab a thread?

Chrome has a multi-process architecture and each process is heavily multi-threaded. The main goal is to keep the main thread (“UI” thread in the browser process) and IO thread (each process' thread for handling IPC) responsive.

Is Google Chrome multi-threaded?

Chrome has a multi-process architecture and each process is heavily multi-threaded. In this document we will go over the basic threading system shared by each process. The main goal is to keep the main thread (a.k.a. “UI” thread in the browser process) and IO thread (each process's thread for receiving IPC) responsive.

What is Source tab?

At its simplest, the Sources tab allows you to set breakpoints and evaluate expressions in Javascript whether that Javascript was loaded from a separate file or was part of the page as illustrated in figure 1, below, which is a screen shot of the very simple Example 1.

What is ThreadPoolForeg?

In the screenshot above, ThreadPoolForeg is a thread name belonging to Webkit-based web browsers like Opera and Chrome. Additionally, names like kworker/u8:2 or swapper/1 are kernel threads. In short, you may need to research which application each thread name belongs to.


1 Answers

It's there when the page you're looking is using Web Workers to run multiple threads. (Try it on this demo page.)

It allows you to select which thread to debug.

For example, you can pause in execution in multiple threads at the same time. When you click on each thread the call stack etc. are updated to show the information for that thread.

like image 106
Matt Zeunert Avatar answered Oct 25 '22 00:10

Matt Zeunert