C.4. Controlling Execution Using the Step Into, Step Over, Step Out and Continue Commands

Sometimes you will need to execute a program line-by-line to find and fix logic errors. Stepping through a portion of your program this way can help you verify that a method’s code executes correctly. The commands you learn in this section allow you to execute a method line-by-line, execute all the statements of a method or execute only the remaining statements of a method (if you have already executed some statements within the method).

1.
Setting a breakpoint. Set a breakpoint at line 16 by left clicking in the margin indicator bar (Fig. C.16).
Figure C.16. Setting a breakpoint in the program.
2.
Starting the debugger. Select ...

Get Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.