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 press F5 or start the application in debug mode, it will break at the point where you placed it. A yellow arrow head at the left-hand side bar represents a marker of the current execution of the line, having a yellow block on the execution line. You can also drag the marker arrow up or down within the same debugging context to restart or continue the execution of the code block:

When you right click the breakpoint circle on the left-hand side bar, a context menu will pop up on the screen which allows you to delete or disable the breakpoint:

In case you want to delete or disable all the breakpoints in the currently loaded solution, you can navigate to the Visual Studio Debug menu and click Delete All Breakpoints or Disable All Breakpoints respectively. From this menu, you can also create a new breakpoint or toggle an existing breakpoint:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.31.159