From the course: Debugging in C#
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
What is a breakpoint?
- [Speaker] A breakpoint is an intentional stopping point or pause put into a program for debugging purposes. A breakpoint allows us to temporarily halt a program in execution in order to inspect the internal state of the application at that point. Jumping back into Visual Studio Code we can add a breakpoint to our program. To add a breakpoint we just hover to the left of the line number and click. This adds a breakpoint to this specific line and the program will stop its execution before executing this line. Let's add breakpoints to a few areas we think might be problematic or really determine the output of this program. So here, line eight, this operation is key to tripling a number. So let's go ahead and add a breakpoint to the line after it. So line eight will execute and then the program will stop its execution. We can also add a breakpoint to 15, here. So right before we print things out to the consol we'll go ahead and stop the program and make sure everything looks good. Now…
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
-
-
-
-
-