Breakpoints allow us to mark a line of code that we want to pause at to find bugs. Click on the open curly brace at the beginning of the Main method and press F9.
A red circle will appear in the margin bar on the left-hand side to indicate that a breakpoint has been set, as shown in the following screenshot:
Breakpoints can be toggled with F9. You can also left-click in the margin to toggle the breakpoint on and off, or right-click to see more options, such as remove, disable, or edit the breakpoint.
In Visual Studio 2017, go to Debug | Start Debugging, or click on the Start toolbar button, or press F5.
In Visual Studio ...