Threads Window

.NET applications can run multiple threads. This can happen with your applications, too. You can get a view of the running threads and debugging threads within the Threads window, which you can enable by pressing Ctrl+Alt+H. Figure 5.17 shows the Threads window open when the sample application is in break mode.

Image

FIGURE 5.17 The Threads window.

The window shows a list of running threads and enables stepping into the Call Stack for the various threads. If the source code is available for threads other than the current one, you can step into this code. In our example, the main thread is the Console application. You can also organize and filter the view, search within the Call Stack, and get information on the thread’s priority. The Threads window is particularly useful with multithreaded applications. For applications that use the Task Parallel Library and the Async/Await pattern, the Visual Studio 2015 debugger provides other tools, which are described in Chapters 41, “Parallel Programming and Parallel LINQ,” and 42, “Asynchronous Programming.”


Call Stack

You can get the method call stack per thread by passing the mouse pointer over each thread in the window. The list of method calls is offered under the form of a tooltip.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.135.80