THE CODE EDITOR AT RUN TIME

The code editor behaves slightly differently at run time and design time. Many of its design-time features still work. Breakpoints, bookmarks, IntelliSense, and snippets still work.

At run time, the editor adds new tools for controlling the program’s execution. Right-click a value and select Add Watch or QuickWatch to examine and monitor the value. Use the Step Into, Step Over, and Step Out commands on the Debug menu or toolbar to make the program walk through the code. Hover the mouse over a variable to see a tooltip giving the variable’s value (see the section “Tooltips” earlier in this chapter for more information).

ESSENTIAL SHORTCUTS
Some very handy runtime shortcuts are F5 (Start Debugging), F8 (Step Into), Shift+F8 (Step Over), and Ctrl+F9 (Set Next Statement). Some particularly handy code editing shortcuts are F9 (Toggle Breakpoint) and Shift+Space (Open IntelliSense). You might want to write down these and any others that you use frequently.
(Note that some shortcuts are different if you don’t have Visual Studio set up for Visual Basic development. If the IDE is customized for C# or general development, Step Over is F10 and Step Into is F11.)

Right-click and select Show Next Statement to move the cursor to the next statement that the program will execute. Select Run To Cursor to make the program continue running until it reaches the cursor’s current line.

Right-click and select Set Next Statement to make the program skip to a new location. ...

Get Visual Basic 2012 Programmer's Reference 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.