From the course: Visual Studio: Advanced Debugging Tools
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Debug with the parallel watch - Visual Studio Tutorial
From the course: Visual Studio: Advanced Debugging Tools
Debug with the parallel watch
- [Instructor] The watch window exists so that we can create our own custom watches when we're debugging our application. Add a watch by going here and typing in the value of the watch or by dragging your item from your code window into this empty slot. I've already added battery level, laser color, item count, and this Thread.CurrentThread.ManagedThreadid. And because these are in scope, at this thread and at this breakpoint, I can see their values. Now, they're in scope because I am inside my robot class. These are properties in my robot class, and I'm in this method fine gemstones, so I'm inside an instance of that class. And I'm sitting here at this breakpoint on line 36 where the thread is sleeping. I get to see these values. I'll press F5 to run to the next breakpoint, and you see the value changes. I'm now at manage thread five, I was on six. The yellow arrow has changed up here. The values have changed for the…
Contents
-
-
-
-
-
-
(Locked)
Debug multithreaded code2m 47s
-
(Locked)
Run the sample application3m 51s
-
(Locked)
Examine the sample application code8m 22s
-
(Locked)
Overview of the thread debug windows1m 54s
-
(Locked)
Debug with the Threads window3m 21s
-
(Locked)
See worker threads in the Threads window3m 3s
-
(Locked)
Show threads icons in the source editor1m 13s
-
(Locked)
Debug with the parallel watch2m 12s
-
(Locked)
Identify threads with custom names and Flags3m 3s
-
(Locked)
View the Thread call stack1m 37s
-
(Locked)
Examine the modified code for Parallel Stack1m 50s
-
(Locked)
Use the Parallel Stack window4m 6s
-
(Locked)
Conditional breakpoints from Thread ID2m 53s
-
(Locked)
Freeze and thaw threads2m 22s
-
(Locked)
-
-
-