When you build a C# application, you will have two options, debug mode and release mode. Debug mode helps you to step through each and every line of your code to check for errors and fix them if required. Release mode doesn't allow us to step into code. Visual Studio makes it easy for developers by providing more tools, which allows us to Step-in, Step-Over, and Step-Out when a debug point is hit by the runtime. These tools are highlighted in a blue box in the following screenshot:
Apart from these tools, Visual Studio also allows us to view stack trace, inspect variables, and much more. Let's explore this further in order to understand more about debugging.
Let's start with the basics. To place a breakpoint, just click on the left margin next to the line of code you want to debug or place your cursor on the line and press the F9 key...