Debugging Tasks: Quick Reference

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
  • To debug the main project, choose Debug > Debug Main Project.
  • To debug any individual project, right-click the project and choose Debug Project.
  • To debug a core file, choose Debug > Debug core file, and specify the core file, executable, and project in the Debug Core File dialog box.
  • To debug an executable, choose Debug > Debug Executable, and specity the executable an project.
  • To attach the debugger to a running process, choose Debug > Attach Debugger.
  • To attach the debugger to a process as it starts, choose Debug > Allow ss-attach requests, start the program by typing the following in a console window, and click Yes in ss-attach Request dialog box:
    ss_attach program_name [ arguments ]
    
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.
  1. In the Source Editor, select the code element on which you wish to set a breakpoint.
  2. Choose Debug > New Breakpoint (Ctrl-Shift-F8).
  3. In the New Breakpoint dialog box, select the breakpoint type, set any required options, and click OK.
Modify breakpoint properties.
  1. Open the Breakpoints window (Alt-Shift-5).
  2. Right-click the breakpoint and choose Customize
  3. 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.
  1. Open the Watches window (Alt-Shift-2).
  2. Right-click the watch, and choose Customize.
Pop the most recent call from the call stack.
Pop multiple calls from the call stack
  1. Open the Call Stack window (Alt-Shift-3).
  2. Right-click the call that you want to remain at the top of the call stack.
  3. 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.

Legal Notices