Using the Debug view

With the Debug view, you can manage the debugging of a program. It displays the stack for the suspended threads for each target you are debugging. Debug targets (associated with threads and stack frames) display in the Debug view for each program or application that you are debugging.

About this task

In the Debug view, each thread in your program is displayed as a node in the tree. When program execution stops, by default, the node for the stopping thread automatically expands to show its stack frame(s). If you manually expand other threads, these threads will automatically expand the next time the program suspends.

When program execution is suspended, the source for the selected stack frame opens in the editor, highlighting the source line that the program is about to execute.

Running and terminating

About this task

You can perform these basic debug actions in the Debug view:

  • To run your application, click the Resume button ( Resume icon).
  • To terminate the debug session, right-click the debug target (or one of its threads or stacks) that you want to terminate, and choose one of the terminate actions.

Stepping through a program

About this task

When a thread is suspended, there are several step operations you can use to step through the execution of the program line-by-line. While performing a step operation, if a breakpoint or exception is encountered, execution suspends at the breakpoint or exception, and the step operation ends. You can use step commands to step through your program a single instruction or location at a time.

The following step commands are available:

  • Step Over: When you issue a step over, the called function runs without stepping into it.
  • Step Into: When you issue a step into, your program runs to the next hook or statement.
  • Animated Step Into: When you issue this action, the debugger issues a step into action repeatedly. You can control the delay between each step by selecting the Animated Step Into icon down-arrow. You can also configure the animated step action in the Animated Step Into preference page. For information about debug preferences, see the related topic.
  • Step Return: When you issue a step return, your program runs to the return point (just after the call point).

Feedback