Step 1: Setting up your project
Step 2: Setting breakpoints
Step 3: Launching the debugger
After setting the breakpoints, the next step is to launch the debugger. In Visual Studio, click on the “Start Debugging” button located in the top menu. Once you do this, the program will launch and pause at the first breakpoint you set.
Step 4: Inspecting variables
Once your program is paused, you can begin inspecting your variables. To inspect a variable, hover your mouse over it, and the current value of the variables will be displayed. Additionally, you can add a watch to your variable by right-clicking on it and selecting “Add Watch.” This will allow you to see the variables’ values at different points in the program.
Step 5: Stepping through the code