Breakpoints allow you to halt the execution of code at any statement. Once the code is stopped, you can query or change the value of a variable, make use of some of the other debugging windows, and even step through code execution one line at a time. Although setting and removing a breakpoint is a trivial task, it’s one of the most important pieces of the debugging puzzle. Visual Basic .NET has added considerable functionality to breakpoints, including the ability to turn them off and on and to save them with the project. (This last one has been a long time coming.) To make the most of your debugging sessions, you need to make the most of breakpoints.

Creating and Removing Breakpoints

To add a breakpoint, position the cursor in ...

Get Practical Standards for Microsoft® Visual Basic® .NET, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.