From the course: Visual Studio: Advanced Debugging Tools
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Examine the sample application code - Visual Studio Tutorial
From the course: Visual Studio: Advanced Debugging Tools
Examine the sample application code
- [Instructor] We should start by looking at the code in the Robot class. It's fairly simple. There's a number of properties like name, battery level, laser color, that's what the color of the output I put in the console, how long it takes for the robot to scan for a gemstone, how many gemstones they're supposed to find. And then, the actual work that's run on the various threads is in this method here called FindGemstones, and it's a simple method. It's got a counter for the number of gemstones to find, it checks the battery level, and if it drops below 10% then the robot returns to recharge. And then, it outputs a bunch of console information. And then, here's the simulated work, we're going to sleep the thread based on the scan delay, then we calculate a new battery level, and that's pretty much it. I'll put some more console. So, the main work is running through this for loop and delaying the thread. 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)
-
-
-