This topic describes common tasks you can perform when debugging a
C, C++, or Fortran project. For more
detailed information, click the links in the right column.
To perform this task |
Follow these steps |
Start a debugging session
|
|
Finish a debugging session.
|
-
To finish the current session, choose Debug >
Finish Debugger Session (Shift-F5).
- To finish any session, open the Sessions window (Alt-Shift-6),
right-click the session, and choose Finish.
|
Set a line breakpoint.
|
- In the Source Editor,
click in the left margin next to the desired line..
|
Set any type of breakpoint.
|
- In the Source Editor, select the code element on which you
wish to set a breakpoint.
- Choose Debug > New Breakpoint (Ctrl-Shift-F8).
- In the New Breakpoint dialog box, select the breakpoint type, set
any required options, and click OK.
|
Modify breakpoint properties.
|
-
Open the Breakpoints window (Alt-Shift-5).
-
Right-click the breakpoint and choose Customize
-
Change any required settings and actions and click OK.
|
Set a watch
|
- In the Source Editor, right-click a variable or expression and
choose New Watch (Ctrl-Shift-F7)..
|
Modify a watch.
|
-
Open the Watches window (Alt-Shift-2).
- Right-click the watch, and choose Customize.
|
Pop the most recent call from the call stack.
|
|
Pop multiple calls from the call stack
|
-
Open the Call Stack window (Alt-Shift-3).
-
Right-click the call that you want to remain at the
top of the call stack.
- Choose Pop to Here.
|
Browse information for calls on the call stack.
|
- To move down the call stack, choose Debug
> Stack > Make Callee Current (Ctrl-Alt-up arrow).
- To move up the call stack, choose Debug > Stack >
Make Caller Current (Ctrl-Alt-down arrow).
- To make a call current, double-click the call in the
Call Stack window.
|