From the course: Visual Studio 2019 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Step through code in the debugger - Visual Studio Tutorial
From the course: Visual Studio 2019 Essential Training
Step through code in the debugger
- Once you have breakpoints in your code, you'll want to step through the code and observe the behavior of the application. This video shows how to effectively navigate code while debugging. The code I'm using is in two locations. It's in this main window .zaml.cs file. I'll be using some code in this click event handler. I've also got some code in this financial.cs file. I've got a method over here called CalculateMonthlyPayment, and we'll be moving into this method and out of this method so I can show how we can transition through method calls. First step is to add a breakpoint to this event handler. I'll put it right here on this first curly brace, by pressing F9. And then I'll run the application, or I should say I'll debug the application, by choosing Start Debugging. Now, click on the button. We hit our breakpoint. I can see that with the yellow arrow superimposed on the red dot. I can also see there's some new windows across the bottom. And there's some new menu items up here…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Set the start-up project49s
-
(Locked)
Use breakpoints effectively6m 27s
-
(Locked)
Step through code in the debugger7m 21s
-
(Locked)
Modify code while debugging with Edit and Continue3m 32s
-
(Locked)
See debug information with DataTips4m 51s
-
(Locked)
Use the Watch, Locals, and Autos windows5m 13s
-
(Locked)
Beyond the basic breakpoint9m 2s
-
(Locked)
Evaluate performance with PerfTips3m 50s
-
(Locked)
-