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?
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With