The Debug Toolbar

Return to Introduction  Previous page  Next page

The Debug toolbar hosts all the important commands you use during a debug session.

  1      2     3     4    5      6     7       8     9    10   11   12   13  14    15    16  17   18   19  20     21
debug toolbar 1

Two of the buttons toggle: the Pause/Resume button (2) and the Enable/Disable Editor Update button (20).

debug toolbar2

From left to right the buttons are as follows:

1

Run Debugger [F6] Both initiates debugging and continues execution of a thread that has been halted by a breakpoint.

2

Pause/Resume debug execution Enables you to temporarily halt execution of every thread in the process being debugged, or resume execution after it has been paused. Clicking on any command button also resumes execution. The Pause button displays in red while execution is suspended.

Note: Pausing execution undermines the validity of the stack trace and local variable information displayed in any of the debug windows; after pausing, this information should not be relied upon.

3

Stop Debugger [Ctrl]+[Alt]+[F6] Terminates debugging. The debuggee process is immediately halted, and the debug platform closed. All debug output (local variables and stack) are cleared. The workbench is closed.

4

Step Over [Alt]+[F6] Causes the debugger to run until the next physical line of code after the current line or, if no further line exists in the method, at the next line in the caller if the method has a caller; ie. the stack depth is greater than one.

5

Step Through Is most useful while recording a debug session. The command has the same behaviour as the StepOver command, except that it records intermediate method calls made between lines. If you are recording and you press the StepOver button, any method called between lines is not recorded. The Step Through command causes the debugger to step into any method executed at the current line, and any subsequent method called when the command is issued. The debugger continues to step until it arrives back at the next line.

6

Step In [Shift]+[F6] Instructs the debugger to try and step over every line of physical code that the thread is executing. However, the debugger  ignores any call to a namespace, function class or method that does not exist in the model. That is, only code either generated within Enterprise Architect or imported into the model is executed.

7

Step Out [Ctrl]+[F6] Instructs the debugger to run until the current method exits and, if the method has a caller (stack depth > 1), to stop at the next line of code in the calling method.

8

Show Execution Point Only enabled when a thread has encountered a breakpoint. The command presents the source code file in an editor window with the current line of code highlighted for the thread that has the current focus. (If only one thread is suspended, that thread has focus; otherwise, a thread has focus if it is selected in the Stack tab. If no thread is selected, the first suspended thread has the focus.)

9

Show Break Points Displays all current breakpoints. Breakpoints are linked to the Project Browser tree, so changing view by clicking in the tree  changes the breakpoints displayed, if any. The only time the breakpoints do not reflect selection changes in the Project Browser window is during a debug session.

10

Delete Break Points Deletes all breakpoints for the currently active view. If debugging, the breakpoints are removed.

11

Disable All Break Points Disables all break points for the current view. They are not deleted, so you can re-enable them.

12

Enable All Break Points Re-enables any disabled break points.

13

Show Local Variables Selects the Locals tab, and shows all variables within the current scope.

Note: During a workbench session, this tab is not visible as all variables are displayed in the Workbench tab.

14

Show Call Stack Selects the Stack tab and shows all currently running threads. The call stack for the any suspended thread is displayed.

15

Record Stack Trace Starts recording the trace history. Recording occurs for the currently suspended thread. The stack history is cleared ready to accept the new trace history.

Note: This option is also available from the shortcut menu on the Stack tab.

16

Auto Record Stack Trace:  Automatically records a stack trace for a selected thread.  All other threads are ignored, although entries appear for all thread creations and terminations. The Step In command is issued automatically until either a breakpoint is encountered, or the thread terminates. If a breakpoint is encountered, the debugger halts. To continue automatic recording click on any continue command (Run, StepIn, StepOut, StepOver) and Stack Trace recording is resumed.

Note: This option is also available from the shortcut menu on the Stack tab.

17

Stop Recording Stops recording into the stack trace history.

Note: This option is also available from the shortcut menu on the Stack tab.

18

Create Sequence Diagram Creates a sequence diagram from a recorded Stack Trace history. Give your diagram a name and it is placed in the package for this debug session.

19

Save Saves recorded history to an HTML file for viewing in a browser, or to an XML file for opening later in Enterprise Architect.

20

Disables and enables update of the editor window with the current line of executing source code. During automatic recording of a thread, time is spent updating the editors with the current line of executing code. To speed up execution in debugging larger applications, you can disable this highlighting in any editors.

21

Accesses a menu that enables quick access to relevant commands. The commands are:

·Build - run package build scripts
·Test - run package test scripts
·Run - run debug
·Create workbench instance
·Package Build Scripts - configure package build scripts

See Also