From the course: Visual Studio: Advanced Debugging Tools
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
See worker threads in the Threads window - Visual Studio Tutorial
From the course: Visual Studio: Advanced Debugging Tools
See worker threads in the Threads window
- [Narrator] I have three choices for looking at multiple threads. Use parallel, use tasks, and use async/await. All three of them will show multiple threads, but I think the one that's best for this video, and the rest of the chapter, is number three, or C: Use Tasks. And the reason why is it lets us see when the new thread is spawned. I'll press C, and we'll start by looking at the threads window at the top. It looks the same as the last example. I'm on the main thread, ID one, I'm going to run the code in this ChargeBatteries by pressing F10. And when I finish, I'm still on Managed Thread One, main thread. At this point, when I press F10, what's going to happen? I'm asking the task class to create a new task, and start it. So, I'm not actually creating a thread. I'm creating a task, and asking the task to run this code in FindGemstones, and on my behalf, it will create another…
Contents
-
-
-
-
-
-
Debug multithreaded code2m 47s
-
Run the sample application3m 51s
-
Examine the sample application code8m 22s
-
Overview of the thread debug windows1m 54s
-
Debug with the Threads window3m 21s
-
See worker threads in the Threads window3m 3s
-
Show threads icons in the source editor1m 13s
-
Debug with the parallel watch2m 12s
-
Identify threads with custom names and Flags3m 3s
-
View the Thread call stack1m 37s
-
Examine the modified code for Parallel Stack1m 50s
-
Use the Parallel Stack window4m 6s
-
Conditional breakpoints from Thread ID2m 53s
-
Freeze and thaw threads2m 22s
-
-
-
-