From the course: Debugging in C#
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Execution in debug mode
- [Instructor] When debugging code, we often use breakpoints to stop the program's execution and inspect the internal state of the given variables. We did this before, but sometimes, we want to add a little more control over how and when our program is executing. Debug mode in Visual Studio Code gives us this control with a few buttons. And we've already one of these buttons, the Continue button. Let's add a breakpoint here. We'll add one to Console's at WriteLine(sum) and then another to line 24. And you'll notice there are some buttons that appear at the top here. The Continue button is the button we've used before. It allows us to continue the program's execution after hitting a breakpoint. If we click this button, we jump to the next breakpoint. It's important to remember that after hitting the Continue button, the program will only stop again if it runs into another breakpoint. This means if I hit the Continue button again, the program continues executing until it's finished and…
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
-
-
-
What is debugging?2m 1s
-
(Locked)
What is a print statement?2m 1s
-
(Locked)
What is a breakpoint?5m 59s
-
(Locked)
Inspecting values of variables4m 28s
-
(Locked)
Execution in debug mode3m 40s
-
(Locked)
The debugging process2m 11s
-
(Locked)
Beginner debugging code challenge1m 13s
-
(Locked)
Beginner debugging code challenge: Solution6m 45s
-
-
-
-
-