Exploring breakpoints in VS
Breakpoints are a fundamental part of software development. They allow you to stop the flow of your application at any point where you want to inspect the state of your objects.
To place a breakpoint in VS, it is enough to position ourselves right next to the numbering of the lines. A gray circle will appear and disappear as we move our cursor over the line numbers.
Once we find the line we want to debug, we just need to left-click once, which will cause the circle to turn red, as shown in Figure 3.11. Once you have done this, if you move the cursor away from the circle, you will be able to see that it remains as-is, as shown in the following screenshot:
Figure 3.11 – Placing a breakpoint
If we proceed to execute the application with the breakpoint set, we will see how the application flow stops immediately after starting the application, as shown in Figure 3.12:
Figure 3.12 – Debugging...