DEBUGGING VISUAL BASIC PROGRAMS Sarah Bin shalan QUICK

DEBUGGING VISUAL BASIC PROGRAMS Sarah Bin shalan

QUICK REFERENCE To Do This Display the Debug toolbar On the View menu, point to Toolbars, and then click Debug. Set a breakpoint In the Code Editor, click in the Margin Indicator bar next to the statement where you want to stop program execution. When the compiler reaches the breakpoint, it will enter debugging mode. or Place a Stop statement in the program code where you want to enter debugging mode. Execute one line of code in the Code Editor Click the Step Into button on the Standard toolbar. Examine a variable, a property, or an expression in the Code Editor In debugging mode, select the value in the Code Editor, and then hold the pointer over it. Use the Autos window to examine a variable on the current or previous line In debugging mode, click the Debug menu, point to Windows, and then click Autos. Add a variable, a property, or an expression to a Watch window In debugging mode, select the value in the Code Editor, right-click the value, and then click Add Watch.

QUICK REFERENCE To Do This Display a Watch window In debugging mode, click the Debug menu, point to Windows, point to Watch, and then click the window. Open the Immediate window Click the Debug menu, point to Windows, and then click Immediate. Remove one or more breakpoints Click the breakpoint in the Margin Indicator bar of the Code Editor. or Click the Delete All Breakpoints command on the Debug menu. Stop debugging Click the Stop Debugging button on the Standard toolbar.

REFERENCE • M. HALVORSON, VISUAL BASIC 2010 STEP BY STEP.
- Slides: 4