Debug Perspective

The Debug perspective is an Eclipse perspective that provides the tools and resources for debugging. To switch to it, click on the Open Perspetive button (open perspective button) in the top-right corner of the Eclipse window and select Debug.

Views

This perspective provides several specialized views that present information useful in debugging.

Debug View

The Debug view displays the stack frame for the suspended threads for each target you are debugging. Each thread in your program appears as a node in the tree. It displays the process for each target you are running. If the thread is suspended, its stack frames are shown as child elements. The view toolbar provides a button to Remove All Terminated Launches (Remove All Terminated Launches).

debug view

Editor

The editor lets you see how information provided in other views relates to your source code. For example, the following screen shot shows the editor when execution is stopped at a breakpoint.

You can add or remove breakpoints by double-clicking in the far right margin of the editor. You can also disable or enable a breakpoint by positioning the cursor over the breakpoint, and selecting from the right-click context menu.

editor in debug perspective

Variables View

The Variables View displays information about the variables associated with the stack frame selected in the Debug View. You can select variables to have more detailed information be displayed in the Detail Pane at the bottom of the view. You can also change the value of a variable during debugging by editing it in Value column.

variables view

Breakpoints View

The Breakpoints View lists all the breakpoints currently set in your workspace. You can double-click a breakpoint to display its location in the editor (if applicable). Select or clear the check box at the left to enable or disable the breakpoint.

breakpoints view

You can set a special type of breakpoint called a watchpoint. A watchpoint is a special breakpoint that stops the execution of an application whenever the value of a given expression changes, without specifying where it might occur. Unlike breakpoints (which are line-specific), watchpoints are associated with files. They take effect whenever a specified condition is true, regardless of when or where it occurred. You can set a watchpoint on a variable by selecting the variable in the editor, then selecting Run > Toggle Watchpoint from the main menu. You can manage the watchpoint in the breakpoints view, as you would any other breakpoint.

The following commands are available from the breakpoints view toolbar. Many of them are also available from the context menu.

Toolbar Button Command Description
Remove selected breakpoint Remove selected breakpoint Removes one or more selected breakpoints.
Remove all breakpoints Remove all breakpoints Removes all breakpoints.
Remove all breakpoints Show supported breakpoints If selected, only breakpoints applicable to the current debug target are visible in the breakpoints view. For example, if you have both Java and ObjectScript breakpoints, with this option turned on you see only those breakpoints applicable to what you are currently debugging. When you are debugging a Java program the breakpoints view only displays Java breakpoints.
Goto file for breakpoint Goto file for breakpoint Select this command to open the associated resource for the breakpoint, make it active, and highlight the location of the breakpoint. If the resource is already open it is made active and the breakpoint location is highlighted.
Skip all breakpoints Skip All Breakpoints Execute without stopping at any breakpoints.

Expressions View

You can use the Expressions View to examine data during debugging. The Variables View lets you look at the value of variables, but the expressions view lets you enter expressions involving those variables.

Menu and Toolbar Commands

Toolbar Icons for Debugging

The following toolbar icons are available in the main toolbar when you use the Debug perspective. They facilitate the debugging process.

Toolbar Button Command Description
Skip all breakpoints Skip All Breakpoints Execute without stopping at any breakpoints.
Resume Resume Resume execution.
Suspend Suspend Suspend execution.
Terminate Terminate Terminate execution.
Disconnect Disconnect Disconnect from attached process.
Step Into Step Into Step into the current statement.
Step Over Step Over Step over the highlighted statement. Execution continues at the next line.
Step Return Step Return Steps out of the current method and stops execution after exiting the current method.
Debug Debug Launch the currently selected resource or active editor in debug mode, creating a default launch configuration if necessary. Click on the disclosure triangle to see a list of recently used launch configurations.
Run Run Launch the currently selected resource or active editor in run mode, creating a default launch configuration if necessary. Click on the disclosure triangle to see a list of recently used launch configurations.

Run Menu

The debug perspecive adds many of the commands that appear on the main toolbar to the Run Menu.

Related concepts

Running and Debugging an Atelier Application

Related tasks

Creating an Atelier Launch Configuration
Debugging an Atelier Application

Related reference

Launch Configurations
Debug