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

Execution in debug mode

From the course: Debugging in C#

Start my 1-month free trial

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…

Contents