Running to a Location
Home Page (Debugger) | Overview | How Do I... Topics
What do you want to do?
Run until a breakpoint is reached
Run to the cursor
Run to the cursor location in object code
Run to the cursor location in the call stack
Run to a specified function
Set the next statement to execute
Set the next disassembled instruction to execute
To run until a breakpoint is reached
Set a breakpoint.
On the Build menu, click Start Debug.
From the Start Debug menu, choose Go.
To run to the cursor (while the debugger is not running)
In a source file, move the insertion point to the location where you want the debugger to break.
From the Build menu, select Start Debug and Run To Cursor.
To run to the cursor (while the debugger is running but halted)
In a source file, move the insertion point to the location where you want the debugger to break.
From the Debug menu, choose Run To Cursor.
To run to the cursor location in disassembly code (while the debugger is running but halted)
In the Disassembly window, move the insertion point to the location where you want the debugger to break.
On the Debug menu, click Run To Cursor.
To run to the cursor location in the call stackcode (while the debugger is running but halted)
In the Call Stack window, select the function name.
From the Debug menu, choose Run To Cursor.
To run to a specified function
In the Find box on the standard toolbar, type the function name.
On the Build menu, click Start Debug.
On the Start Debug menu, click Run To Cursor.
Tip You can use the Run To Cursor command to return to an earlier statement to retest your application, using different values for variables.
To set the next statement to execute (while the debugger is running but halted)
In a source window, move the insertion point to the statement or instruction that you want to execute next.
Click the right mouse button.
On the shortcut menu, click Set Next Statement.
To set the next disassembled instruction to execute (while the debugger is running but halted)
In the Disassembly window, move the insertion point to the disassembled instruction you want to execute next.
Click the right mouse button.
On the shortcut menu, click Set Next Statement.
Tip You can use the Set Next Statement command to skip a section of code. For instance, a section that contains a known bug — and continue debugging other sections.
Caution The Set Next Statement command causes the program counter to jump to the new location. The intervening code is not executed. Use this command with caution.