Learn how to control the execution of your program in debug mode with various operations in this video. Explore how to step into, step over, and step out of various code statements and explore how a given input is interacting with your program.
- [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 …
Released
4/23/2019- Debugging defined
- Working with breakpoints
- Inspecting values of variables
- Defensive programming
- Common C# errors
- Debugging challenges
Share this video
Embed this video
Video: Execution in debug mode