Version 6.3.13 for Windows
 —  Debugger  —

Elements of the Debugger

When the debugger has been started, additional elements are available in the Natural Studio window.


Debugger Information in the Title Bar

The title bar of the Natural Studio window shows one of the following:

When you are debugging an object in a remote environment using SPoD, the title bar also shows the port number of the host.

Top of page

Menu Commands

The commands in the Debug menu apply to the debugger.

As long as the debugger has not been started, only the command Start is enabled in the Debug menu. When the debugger has been started, the remaining commands in the Debug menu are enabled and the Go command is shown instead of the Start command.

When an editor window is active and the debugger has been started for the object in this window, the context menu shows commands which apply to the debugger. As long as the debugger has not been started, only the debug command Toggle Breakpoint is available in the context menu.

Detailed descriptions of these commands are provided later in this documentation.

Top of page

Toolbar

The debugger has a special toolbar which provides fast access to the commands available in the Debug menu. As long as the debugger has not been started, only the toolbar buttons for the commands Start and Toggle Breakpoint are enabled in the Debug toolbar. When the debugger has been started, all other toolbar buttons are enabled.

The buttons in the Debug toolbar represent the following menu commands:

Toolbar button

Start (only shown when the debugger has not yet been started)

Toolbar button

Go (only shown after the debugger has been started)

Toolbar button

Restart

Toolbar button

Stop

Toolbar button

Step Over

Toolbar button

Step Into

Toolbar button

Step Out

Toolbar button

Show Trace Position

Toolbar button

Toggle Breakpoint

Toolbar button

Modify Variable

The display of the Debug toolbar can be switched on and off. See Customizing Natural Studio in the Using Natural Studio documentation for further information.

Top of page

Trace Position in Editor Window

The current trace position is indicated by an arrow in the left margin of the editor window.

When the debugger is started, the trace position is shown at the first executable source code line. Example:

graphics/debug-editorwindow.png

When you have scrolled the editor window so that the trace position is no longer visible, you can return to the trace position as described below.

Note:
See also Returning to the Object with the Current Trace Position.

Start of instruction setTo return to the trace position

Top of page

Debugger Windows

When the debugger has been started, the following windows are shown:

Each tab of a debugger window offers a context menu which contains either the commands which can be used in combination with the entire tab (when an entry is not selected) or the commands which can be used with the selected entry. These commands are described later in this documentation.

The debugger windows are moveable and dockable. See Dockable Windows in the documentation Using Natural Studio.

Note:
When the display of the debugger window has previously been switched on using the corresponding command in the View menu, this debugger window (which shows the breakpoints and watchpoints that have been defined in the active environment) will be replaced by the debugger windows described below. See also Debugger Window in the documentation Using Natural Studio.

Variables

This window shows all variables which are available at current state of the program execution.

Variables

An expand or collapse toggle to the left of the variable name indicates a group, an array or redefined field. The toggle for a redefined field additionally contains an "R" (for example: Expand toggle).

The variables are grouped in different categories. A tab is provided for each category:

You can switch between the display of the different types of variables by choosing the corresponding tab at the bottom of the variables window.

See Modifying and Watching Variables for further information.

Start of instruction setTo switch the variables window display on and off

Start of instruction setTo activate the variables window using a shortcut key

Break- and Watchpoints

This window shows all currently defined breakpoints and watchpoints.

Breakpoints and watchpoints

You can switch between the display of the watchpoints and breakpoints by choosing the corresponding tab at the bottom of the break- and watchpoints window.

See Setting Breakpoints and Watchpoints for further information.

Start of instruction setTo switch the break- and watchpoints window display on and off

Start of instruction setTo activate the break- and watchpoints window using a shortcut key

Call Stack

This window shows the objects which have been called during the current debugging session in hierarchical order.

Call stack

See Using the Call Stack for further information.

Start of instruction setTo switch the call stack window display on and off

Start of instruction setTo activate the call stack window using a shortcut key

Top of page