Debugging C# source code using breakpoints
A breakpoint is a signal to tell the debugger to pause the current execution of the application at certain points defined in the code editor and wait for further commands. It does not terminate the execution, but it waits until the next instruction is set to it and then resumes at any time.
The Visual Studio code debugger provides a powerful tool to break the execution where and when you want to start the debugging process. It helps you to observe the behavior of the code in runtime and find the cause of the problem.
Organizing breakpoints in code
Let's start with placing our first breakpoint in the code and gradually move forward with code debugging. Click on the left-hand side bar of the code file in Visual Studio to place the breakpoint. Alternatively, you can press F9 to toggle the breakpoints. Once you place a breakpoint, a red circle will be generated in the side bar and the entire code block in the line will get a dark red background:

When you...