Run the Debugger

The debugger provides a number of ways to start and control a debug session. Many of these facilities are also available through the Debugger toolbar (View | Toolbars | Debug).

Access    Analyzer | Debugger     (Alt+8)
Analyzer Function keys

Using the Debug window

Action

Detail

See also

Start the Debugger

If you have configured an Analyzer script for your target application and you have made it the default script,  you can start debugging the application immediately in the following ways:

Click on the start-Debug button
Press ( F6 ), or
Select the Analyzer | Debug | Debug Run menu option

 

If you have not made your target application the default script it is possible to start any Execution Analysis script by right clicking on it in the Execution Analysis window and selecting the Debug option.

If you have no Analyzer Script, it is still possible to debug a running application by attaching to that process directly:

Click on the attach-to-process (Attach) button and choose the debugging platform to use

 

Before Starting

Analyzer Script Editor

 

 

Debug Another Process

Pause/Resume Debugging

 

To pause a debugging session, or to resume the session after pausing, click on the pause-debug button.

 

Stop the Debugger

To stop debugging, either:

Click on the Debug_Stop (Stop) button
Press (Ctrl+Alt+F6), or
Select the Analyzer | Debug | Debug Stop menu option

 

The debugger normally ends when the current debug process terminates, however some applications and services (e.g. Java Virtual Machine)  may require the debugger to be manually Stopped.

 

Breakpoint and Marker Management

Step Over Lines of Code

To step over the next line of code:

Click on the step-over (Step Over) button
Press ( Alt+F6 ), or
Select the Analyzer | Debug | Step Over menu option

 

 

Step Into Function Calls

To step into a function call:

Click on the stepinto (Step In) button
Press ( Shift+F6 ), or
Select the Analyzer | Debug | Step In menu option

 

If no source is available for the target function then the debugger returns immediately to the caller.

 

 

Step Out Of Functions

To step out of a function:

Click on the step-out (Step Out) button
Press ( Ctrl+F6 ), or
Select the Analyzer | Debug | Step Out menu option

 

If the debugger steps out into a function with no source code, it will continue to step out until a point is found that has source code.

 

 

Show Execution Point

To return to the source file and line of code that the debugger is currently executing, click on the Show-execution-point (Show Execution Point) button.

The appropriate line is highlighted, with a pink arrow in the left margin of the screen.

 

 

Output

During a debug session, messages display in the Debug window detailing:

Startup of session
Termination of session
Exceptions
Errors
Trace messages, such as those output using Java System.out or .NET System.Diagnostics.Debug

 

If you double-click on a debug message, either:

A pop-up displays with more complete message text, or
If there has been a memory leak, the file is displayed at the point at which the error occurred

 

 

Save Output (and Clear Output)

You can save the entire contents of the Debug output to an external .txt file, or you can save selected lines from the output to the Enterprise Architect clipboard.

To save all of the output to file, click on the Saveicon (Save output to file) button.

To save selected lines to the clipboard, right-click on the selection and select the Copy Selected to Clipboard context menu option.

When you have saved the output or otherwise do not want to display it any more, right-click on the current output and select the Clear Results context menu option.

 

 

Switch to Profiler

If you are running a debug session on code, you can stop the debug session and immediately switch to a Profiling session.

To switch from the debugger to the Profiler, click on the DebugOpt | Switch to Profiler option. The Profiler attaches to the currently-running process.

This facility is available on Microsoft Native and Microsoft .NET platforms.

 

Getting Started

Learn more