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

Debug with the parallel watch - Visual Studio Tutorial

From the course: Visual Studio: Advanced Debugging Tools

Start my 1-month free trial

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