87
© Copyright 1998-2009 Sparx Systems Pty Ltd Visual Execution Analyzer in Enterprise Architect Enterprise Architect is an intuitive, flexible and powerful UML analysis and design tool for building robust and maintainable software. This booklet explains the Visual Execution Analyzer (Debugger) feature of Enterprise Architect.

Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

  • Upload
    others

  • View
    36

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

© Copyright 1998-2009 Sparx Systems Pty Ltd

Visual Execution Analyzer inEnterprise Architect

Enterprise Architect is an intuitive, flexible and powerful UMLanalysis and design tool for building robust and maintainable

software.

This booklet explains the Visual Execution Analyzer (Debugger)feature of Enterprise Architect.

Page 2: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, ormechanical, including photocopying, recording, taping, or information storage and retrieval systems - without thewritten permission of the publisher.

Products that are referred to in this document may be either trademarks and/or registered trademarks of therespective owners. The publisher and the author make no claim to these trademarks.

While every precaution has been taken in the preparation of this document, the publisher and the author assume noresponsibility for errors or omissions, or for damages resulting from the use of information contained in this documentor from the use of programs and source code that may accompany it. In no event shall the publisher and the author beliable for any loss of profit or any other commercial damage caused or alleged to have been caused directly orindirectly by this document.

Printed: October 2009

Visual Execution Analyzer in Enterprise Architect

© 1998-2009 Sparx Systems Pty Ltd

PublisherSpecial thanks to:

All the people who have contributed suggestions, examples, bugreports and assistance in the development of Enterprise Architect.The task of developing and maintaining this tool has been greatlyenhanced by their contribution.Managing Editor

Technical Editors

Sparx Systems

Geoffrey Sparks

Geoffrey Sparks

Steve Meagher

Page 3: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

IContents

© 1998-2009 Sparx Systems Pty Ltd

Table of Contents

Foreword 1

Visual Execution Analyzer 2

................................................................................................................................... 4Setup for Build and Run

.......................................................................................................................................................... 5Managing Scripts

.......................................................................................................................................................... 5Build Script Dialog

.......................................................................................................................................................... 7Build Command

.......................................................................................................................................................... 8Test Command

.......................................................................................................................................................... 9Run Command

.......................................................................................................................................................... 10Debug Command

......................................................................................................................................................... 11Microsoft C++ and Native

......................................................................................................................................................... 12Java

......................................................................................................................................... 13Attach to Virtual Machine

......................................................................................................................................................... 14.NET

......................................................................................................................................... 14Debug Assemblies

......................................................................................................................................... 15Debug - CLR Versions

......................................................................................................................................................... 16Recursive Builds

.......................................................................................................................................................... 16Deploy Command

.......................................................................................................................................................... 17Sequence Recording Options

......................................................................................................................................................... 17Enable Filter

......................................................................................................................................................... 19Record Arguments To Function Calls

......................................................................................................................................................... 19Record Calls To External Modules

......................................................................................................................................................... 20Record Calls to Dynamic Modules

......................................................................................................................................................... 21Limit Auto Recording

......................................................................................................................................................... 22Enable Diagnostic Messages

................................................................................................................................... 23Debugging

.......................................................................................................................................................... 23System Requirements

......................................................................................................................................................... 24Enabling Debugger on Windows Vista and Windows 7

.......................................................................................................................................................... 26Use the Debugger

......................................................................................................................................................... 28The Debug Windows

......................................................................................................................................... 29Breakpoints

......................................................................................................................................... 31Locals

......................................................................................................................................... 32Watches

......................................................................................................................................... 32Stack

......................................................................................................................................... 34Recording History

......................................................................................................................................... 35Data Breakpoints

......................................................................................................................................... 36Output

......................................................................................................................................... 37Modules

......................................................................................................................................... 37Workbench

................................................................................................................................... 38Workbench Variables

................................................................................................................................... 39Create Workbench Variables

................................................................................................................................... 40Invoke Methods

......................................................................................................................................... 42File Search

......................................................................................................................................................... 44The Debug Toolbar

......................................................................................................................................................... 45Runtime Inspection

.......................................................................................................................................................... 46Debug ASP .NET

.......................................................................................................................................................... 49Debug COM interop

.......................................................................................................................................................... 51Debug Another Process

.......................................................................................................................................................... 51Debug Java Web Servers

......................................................................................................................................................... 53JBOSS Server

......................................................................................................................................................... 54Apache Tomcat Server

......................................................................................................................................................... 55Apache Tomcat Windows Service

.......................................................................................................................................................... 55Debug Internet Browser Java Applets

.......................................................................................................................................................... 57Generate Sequence Diagrams

Page 4: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

ContentsII

Visual Execution Analyzer in Enterprise Architect

......................................................................................................................................................... 58Record Debug Session For a Method

......................................................................................................................................................... 59Record a Debug Session Using Breakpoints

......................................................................................................................................... 62Record For a Thread Manually

......................................................................................................................................... 63Record For a Thread Automatically

......................................................................................................................................................... 64Recording Markers

......................................................................................................................................................... 67Generate the Sequence Diagram

......................................................................................................................................................... 69Include State Transitions

......................................................................................................................................... 71Enable Capture of State Transitions

......................................................................................................................................... 72Create a State Machine and States

......................................................................................................................................... 73Add Constraints

................................................................................................................................... 75Unit Testing

.......................................................................................................................................................... 75Set Up Unit Testing

.......................................................................................................................................................... 76Run Unit Tests

.......................................................................................................................................................... 77Record Test Results

Index 78

Page 5: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Foreword

This user guide provides an introduction to theVisual Execution Analyzer feature of Enterprise

Architect.

1Foreword

© 1998-2009 Sparx Systems Pty Ltd

Page 6: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

| 2

Visual Execution Analyzer in Enterprise Architect

Visual Execution Analyzer

The visual execution analyzer, or debug capability, is available in the Enterprise Architect Professional, Corporate, Business and Software Engineering, System Engineering and Ultimate editions.

Enterprise Architect enables you to execute build , test , debug , run and deployment scripts,all from within the Enterprise Architect development environment. Enterprise Architect provides developerswith tools to integrate their UML development and modeling with their source development and compilation.With the ability to generate NUnit and JUnit test Classes from source Classes using MDA Transformations,and to integrate the test process directly into the Enterprise Architect IDE, you can now integrate UML andmodeling into the build/test/execute/deploy process.

In addition to build/test and execute functionality, Enterprise Architect includes debugging capabilities for .NET, Java and Microsoft Native (C, C++ and Visual Basic) applications. The debuggers built into EnterpriseArchitect are specifically designed to enable the capture of stack trace information automatically or bystepping through code. The final stack trace history can then be used to generate Sequence diagrams withinEnterprise Architect, converting the actual code execution and calls into visual diagrams. This capabilityprovides an excellent means of managing complexity within a project, and of documenting existing code andensuring that the code written performs as intended by the original architect/developer.

The Build and Run menu is accessed from the Enterprise Architect Project menu or from the context menuof a package in the Project Browser. It enables you to create and store custom scripts that specify how tobuild, test, run and deploy code associated with a package.

With the appropriate scripts set up Enterprise Architect can:

· Call a compiler to build your application, parse the compiler output and open the internal editor to the

7 8 10 9 16

75

23

4

Page 7: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

| 3

© 1998-2009 Sparx Systems Pty Ltd

location of errors and warnings given

· Call a unit testing program to run the defined unit tests and parse the output of JUnit or NUnit, and openthe internal editor to failed tests

· Debug source code using a customizable interface appropriate to the programming language.

Page 8: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | 4

Visual Execution Analyzer in Enterprise Architect

1 Setup for Build and Run

In Enterprise Architect, any package within the UML Model can be configured to act as the 'root' of a sourcecode project. By setting compilation scripts, xUnit commands, debuggers and other configuration settings for apackage, all contained source code and elements can be built, tested or debugged according to the currentlyactive configuration. Each package can have multiple scripts, but only one is active at any one time. The Package Build Scripts dialog enables you to create and manage those scripts.

To access the Package Build Scripts dialog, either:

· Press [Shift]+[F12]

· On the Debug Toolbar , click on the drop-down arrow on theScripts icon (the first icon on the left) andselect the Package Build Scripts option

· Select the Project | Build and Run | Package Build Scripts menu option, or

· Right-click on a package in the Project Browser, and select the Build and Run | Package Build Scriptscontext menu option.

The Package Build Scripts dialog shows which script is active for the current package, and whether or not thescript contains Build, Test, Run, Debug and Deploy components. The current package is as selected in the Project Browser; if a different package is selected, different scripts are available and different breakpoints areapplied.

Note that you must close the Package Build Scripts dialog to select a different package in the Project Browser.However, if the Debug window is open ([Alt]+[8]) you can see which debugging configuration is availableand selected, and which breakpoints are displayed, as you change packages in the Project Browser.

· To create a new script, click on the Add button; the Build Script dialog displays.

44

28

5

Page 9: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | 5

© 1998-2009 Sparx Systems Pty Ltd

· To modify an existing script, highlight the script name in the list and click on the Edit button.

· To copy a script with a new name, highlight the script name to copy and click on the Copy button;Enterprise Architect prompts you to enter a name for the new copy. Enter the new name in the dialog andclick on the OK button. The new copy appears in the list and can be modified as usual.

· To delete a script, highlight the script name to delete, click on the Delete button, and click on the OKbutton.

· To export your scripts, click on the Export button to choose the scripts to export for this package.

· To import build scripts, click on the Import button to choose a .xml file of the scripts to import.

The Default Language field enables you to set the default language for generating source code for all newelements within this package and its descendents.

Select the Use Live Code Generation checkbox to update your source code instantly as you make changesto your model.

Click on the All Package Scripts button to open a new window that displays all scripts in the current project(see the next topic, Managing Scripts ).

Once you have created new scripts or made changes to existing ones, click on the OK button to confirm thechanges, otherwise click on the Cancel button to quit the Package Build Scripts dialog without saving anychanges.

1.1 Managing Scripts

The All Package Build Scripts dialog lists every script in the current project.

To edit a script, double-click on its name or highlight the script and click on the Edit button. The Build Script dialog displays.

To delete a script, highlight the script and click on the Delete button. Enterprise Architect prompts you toconfirm the deletion. Click on the Yes button to continue and delete the script.

1.2 Build Script Dialog

The Build Script dialog enables you to maintain the runtime components of a package. This is where youconfigure how a package is built, assign any debugger, configure tests and detail how the package should bedeployed. You access this dialog by clicking on the:

· Add button on the Package Build Scripts dialog, or

· Edit button on the All Package Build Scripts dialog.

Each script requires a name and a working directory.

5

5

Page 10: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Build Script Dialog6

Visual Execution Analyzer in Enterprise Architect

To use the tabs on this dialog, see the following topics:

· Build Command

· Test Command

· Run Command

· Deploy Command

· Debug Command

· Sequence Tab Options.

7

8

9

16

10

17

Page 11: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Build Command 7

© 1998-2009 Sparx Systems Pty Ltd

1.3 Build Command

The Build tab enables you to enter multiple commands for building the current package. These commands areexecuted when you select the Project | Build and Run | Build menu option.

Write your script in the large text box using the standard Windows Command Line commands. You canspecify, for example, compiler and linker options, and the names of output files. The format and content of thissection depends on the actual compiler, make system, linker and so on that you use to build your project. Youcan also wrap up all these commands into a convenient batch file and call that here instead.

If you select the Capture Output checkbox, output from the script is logged in Enterprise Architect's Outputwindow. This can be activated by selecting the View | Output menu option.

The Output Parser field enables you to define a method for automatically parsing the compiler output. If youhave selected the Capture Output checkbox, Enterprise Architect parses the output of the compiler so that byclicking on an error message in the Output window, you directly access the corresponding line of code.

Notes:

· The command listed in this field is executed as if from the command prompt. Therefore, if the executablepath or any arguments contain spaces, they must be surrounded by quotes.

· Throughout this dialog, you can use Local Paths in specifying paths to executables; see the CodeEngineering Settings section in Code Engineering Using UML Models.

When you run the compile command inside Enterprise Architect, output from the compiler is piped back to the Output window and displayed as in the following illustration:

Page 12: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Build Command8

Visual Execution Analyzer in Enterprise Architect

If you double-click on an error line, Enterprise Architect loads the appropriate source file and positions thecursor on the line where the error has been reported.

1.4 Test Command

Here you can create a command for performing unit testing on your code. The command is entered in the textbox using the standard Windows Command Line commands. A sample script would contain a line to executethe testing tool of your choice, with the filename of the executable produced by the Build command as theoption. To execute this test select the Project | Build and Run | Test menu option.

Testing could be integrated with any test tool using the command line provided, but in these examples you cansee how to integrate NUnit and JUnit testing with your source code. Enterprise Architect provides an inbuiltMDA Transform from source to Test Case, plus the ability to capture xUnit output and use it to go directly to atest failure. xUnit integration with your model is now a powerful means of delivering solid and well-tested codeas part of the complete model-build-test-execute-deploy life-cycle.

Note:

NUnit and JUnit must be downloaded and installed prior to their use. Enterprise Architect does not includethese products in the base installer.

The Capture Output checkbox enables Enterprise Architect to show the output of the program in the Outputwindow, while the Output Parser field specifies what format output is expected. When parsing is enabled,double-clicking on a result in the Output window opens the corresponding code segment in EnterpriseArchitect's code window.

Selecting the Build before Test checkbox ensures that the package is recompiled each time you run the test.

Two example test scripts are included below. The first is an NUnit example that shows the Build before Testcheckbox selected. As a result, every time the test command is given it runs the build script first.

Page 13: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Test Command 9

© 1998-2009 Sparx Systems Pty Ltd

Note:

The command listed in this field is executed as if from the command prompt. As a result, if the executablepath or any arguments contain spaces, they must be surrounded in quotes.

The second example is for JUnit. It doesn't have the Build before Test checkbox selected, so the build scriptwon't be executed before every test, but as a result it could test out of date code. This also shows the use of %N, which is replaced by the fully namespace-qualified name of the currently selected Class when the script isexecuted.

1.5 Run Command

Here you can enter a command for running your executable. This is the command that is executed when youselect the Project | Build and Run | Run menu option. At its simplest, the script would contain the locationand name of the file to be run.

Note:

Enterprise Architect provides the ability to start your application normally OR with debugging from the samescript. The Build and Run menu has separate options for starting a normal run and a debug run.

The following two examples show scripts configured to run a .Net and a Java application in Enterprise

Page 14: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Run Command10

Visual Execution Analyzer in Enterprise Architect

Architect.

Note:

The command listed in this field is executed as if from the command prompt. As a result, if the executablepath or any arguments contain spaces, they must be surrounded in quotes.

1.6 Debug Command

The Debug tab of the Build and Run dialog enables you configure how to debug your application withinEnterprise Architect. Details on how to complete the fields for a variety of debugging scenarios are provided inthe following platform-specific topics:

· Java

· .NET

· Microsoft Native.

12

14

11

Page 15: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Debug Command 11

© 1998-2009 Sparx Systems Pty Ltd

1.6.1 Microsoft C++ and Native

You can also configure how to debug applications built in a Microsoft Native code. The example script below isconfigured to enable debugging of a C++ project built in Microsoft Visual Studio 2005 or 2008.

You can debug native code only if there is a corresponding PDB file for the executable. You normally createthis as a result of building the application with debug information.

The script must specify two things to support debugging:

· The path to the executable

· Microsoft Native as the debugging platform.

Page 16: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Debug Command12

Visual Execution Analyzer in Enterprise Architect

1.6.2 Java

Option Use to

Application (Enter path) Identify the fully qualified Class name to debug, followed by any arguments.The Class must have a method declared with the following signature:

public static void main(String[]);

The debugger calls this method on the Class you name. In the example above,the parameters 1, 2 and 3 are passed to the method.

You can also debug a Java application by attaching to an existing Javaprocess .

Enter any run timevariables below

Type any required command line options to the Java Virtual Machine.

You also must provide a parameter (jre) that is a path to be searched for thejvm.dll. This is the DLL supplied as part of the Java runtime environment orJava JDK from Sun MicrosystemsTM (see Debugging ).

In the example above, a virtual machine is created with a new Class pathproperty that comprises any paths named in the environment variable classpath 1603 plus the single path "C:\benchmark\java\example1".

If no Class path is specified, the debugger always creates the virtual machinewith a Class path property equal to any path contained in the environmentvariable plus the path entered in the default working directory of this script.

Note:

If source files and .class files are located under different directory trees, theClass path property MUST include both root path(s) to the source and rootpath(s) to binary class files.

Show Console Create a console window for Java. If no console window is required, leave

13

23

Page 17: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Debug Command 13

© 1998-2009 Sparx Systems Pty Ltd

Option Use to

blank.

Use Debugger Select Java.

1.6.2.1 Attach to Virtual Machine

You can debug a Java application by attaching to an existing Java process. However, the Java processrequires a specific startup option specifying the Sparx Systems Java Agent. The format of the command lineoption is:

-agentlib:SSJavaProfiler75

or:

-agentpath:"c:\program files\sparx systems\ea\SSJavaProfiler75"

The example below is for attaching to the Tomcat Webserver. Select the Attach to process radio button, andthen the keyword Attach is all that you have to enter. This keyword causes the debugger to prompt you for aprocess at runtime.

Note:

The Show Console checkbox has no effect when attaching to an existing virtual machine.

No run time variables are necessary when attaching.

Page 18: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Debug Command14

Visual Execution Analyzer in Enterprise Architect

1.6.3 .NET

Option Use to

Application (Enter path) Select and enter either the full or the relative path to the applicationexecutable, followed by any command line arguments.

Enter any runtime variablesbelow

Type any required command line options, if debugging a single .NETAssembly .

Show Console Create a console window for the debugger. Not applicable for attachingto a process.

Use Debugger Select the debugger to suit the .NET Framework under which yourapplication runs.

Note:

If you intend to debug managed code using an unmanaged application, please see the Debug - CLRVersions topic.

1.6.3.1 Debug Assemblies

Enterprise Architect permits debugging of individual assemblies. The assembly is loaded and a specifiedmethod invoked. If the method takes a number of parameters, these can be passed.

Constraints

Debugging of assemblies is only supported for .NET version 2.

The following image is of a Build Script configured for debugging a .NET assembly.

14

15

Page 19: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Debug Command 15

© 1998-2009 Sparx Systems Pty Ltd

Notice the Enter any run time variables below field. This field is a comma-delimited list of values that mustpresent in the following order:

type_name, method_name, { method_argument_1, method_argument2,....}

where:

· type_name is the qualified type to instantiate

· method_name is the unqualified name of the method belonging to the type that is invoked

· the argument list is optional depending on the method invoked.

The information in this field is passed to the debugger.

1.6.3.2 Debug - CLR Versions

Please note that if you are debugging managed code using an unmanaged application, the debugger mightfail to detect the correct version of the Common Language Runtime (CLR) to load. You should specify a configfile if you don’t already have one for the debug application specified in the Debug command of your script. Theconfig file should reside in the same directory as your application, and take the format:

name.exe.config

where name is the name of your application.

The version of the CLR you should specify should match the version loaded by the managed code invoked bythe debuggee.

Sample config file:

<configuration>            <startup>                    <requiredRuntime version="version "/>            </startup></configuration>

where version is the version of the CLR targeted by your plugin or COM code.

For further information, see http://www.msdn2.microsoft.com/en-us/library/9w519wzk.aspx.

Page 20: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Debug Command16

Visual Execution Analyzer in Enterprise Architect

1.6.4 Recursive Builds

For any project you can apply the command entered in the build script to all sub folders of the initial directoryby specifying the token %r immediately preceding the files to be built. The effect of this is that EnterpriseArchitect iteratively replaces the token with any subpath found under the root and executes the commandagain.

The output from this Java example is shown below:

Note:

The path being built is displayed along with the exit code.

1.7 Deploy Command

This section enables you to create a command for deploying the current package. These are the commandsthat are executed when you select the Project | Build and Run | Deploy menu option.

Write your script in the large text box using the standard Windows Command Line commands.

Page 21: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Sequence Recording Options 17

© 1998-2009 Sparx Systems Pty Ltd

1.8 Sequence Recording Options

The Sequence Diagram Recording tab enables you to set various options for generating Sequence diagramsfrom the debugger.

These options are not all available for each platform, as indicated in the following table:

Option .NET Java Native

Enable Filter X X X

Record arguments to function calls X X X

Record calls to external modules X X X

Record calls to dynamic modules X - -

Capture state transitions using constraint X X X

Limit auto recording to stack frame threshold - - X

Enable diagnostic messages X X X

1.8.1 Enable Filter

If the Enable Filter option is selected on the Sequence Diagram Recording tab, the debugger excludes callsto matching methods from the generated sequence history and diagram. The comparison is case-sensitive.

To add a value, click on the New (Insert) icon in the right corner of the Filters box, and type in the comparisonstring. Each filter string takes the form:

class_name_token::method_name_token

The class_name_token excludes calls to all methods of a Class or Classes having a name that matches thetoken. The string can contain the wildcard character * (asterisk). The token is optional.

The method_name_token excludes calls to methods having a name that matches token. The string cancontain the wildcard character *. The token is optional.

Where no Class token is present, the filter is applied only to global or public functions; that is, methods notbelonging to any Class.

17

19

19

20

69

21

22

Page 22: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Sequence Recording Options18

Visual Execution Analyzer in Enterprise Architect

To Filter Use Filter Entry

All public functions having a name beginning with Get from the recordingsession (GetClientRect for example in Windows API).

::Get*

All methods beginning with Get for every Class member method.*::Get*

All methods beginning with Get from the Class CClass.CClass::Get*

All methods for Class CClass.CClass::*

All methods for Classes belonging to Standard Template and Active TemplateLibraries. · ATL*

· std*

The specific method GetName for Class CClass.CClass::GetName

In the Java example in the screen below, the debugger would exclude:

· Calls to OnDraw method for Class Example.common.draw.DrawPane

· Calls to any method of any Class having a name beginning with Example.source.Collection

· Calls to any constructor for any Class (ie: <clint> and <init>).

In the Native code example below, the debugger would exclude:

· Calls made to Standard Template Library namespace

· Calls to any Class beginning with TOb

· Calls to any method of Class CLock

· Calls to any Global or Public Function with a name beginning with Get

· Calls to the method GetLocation for Class Ctrain.

Page 23: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Sequence Recording Options 19

© 1998-2009 Sparx Systems Pty Ltd

1.8.2 Record Arguments To Function Calls

When recording the sequence history, Enterprise Architect can record the arguments passed to method calls.

When the Record Arguments to function calls option is selected on the Build Script dialog SequenceDiagram Recording tab, the resulting Sequence diagram shows the values of elemental and string typespassed to the method. See the following Java example.

Where the argument is not an elemental type, the type name is recorded instead.

1.8.3 Record Calls To External Modules

On the Sequence Diagram Recording tab, the Record calls to external modules option causes function callsto external modules outside the model to be included in the sequence history and generated diagram.

For applications built in a Microsoft Native code (C, C++) you can record calls to the WIN32 API if required,using the Record calls to external modules option. This option can also be used to record calls to

Page 24: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Sequence Recording Options20

Visual Execution Analyzer in Enterprise Architect

functions in modules that have a PDB file but for which there is no source.

Only calls originating within the model to functions external to the model are recorded.

Note:

External calls are displayed with a blue connector, as shown below.

This example shows three external calls (ToString()) to the Microsoft .NET framework assembly functionSystem.Single.

1.8.4 Record Calls to Dynamic Modules

(Available only for .NET platforms.)

On the Sequence Diagram Recording tab, the Record calls to dynamic modules option causes thedebugger to record execution of dynamic or 'In Memory' function calls, in transitions between normalassemblies and those emitted dynamically.

Page 25: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Sequence Recording Options 21

© 1998-2009 Sparx Systems Pty Ltd

1.8.5 Limit Auto Recording

(Available only for Native platforms.)

Where the Stack window shows recording to be involved in function calls that are not particularly useful, andthat are not being excluded in a filter, you can achieve a quicker and more general picture of a sequence bylimiting the stack depth being recorded. You can do this on the Sequence Diagram Recording tab, by selectingthe Limit auto recording to stack frame threshold: option.

If you use this option, be aware that the threshold value you set is a relative frame count; that is, the count isrelative to the frame at which recording begins. For example:

A breakpoint has occurred, and the Stack window shows five frames. If the stack frame threshold is setto 3 and you begin auto-recording at this breakpoint, the debugger records all function calls between thecurrent frame 5 and a maximum stack frame depth of 8 inclusive.

For situations during auto-recording where the stack is very large, it is recommended that you first use a lowstack frame threshold of 2 or 3, gradually increasing it if necessary to expand the picture. You can also use thethreshold to work out which filters you could add to the script in order to further clarify the Sequence diagramthat is ultimately produced.

Page 26: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Setup for Build and Run | Sequence Recording Options22

Visual Execution Analyzer in Enterprise Architect

1.8.6 Enable Diagnostic Messages

The Enable diagnostic messages checkbox triggers the debugger to output more self-reporting, diagnosticmessages as it executes. For example, the debugger might output messages about method calls that arebeing excluded from the recording history due to a filter also having been set in the Sequence DiagramRecording tab of the Build Script dialog.

Page 27: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | 23

© 1998-2009 Sparx Systems Pty Ltd

2 Debugging

Enterprise Architect enables debugging of source code within Enterprise Architect, using a debug interfaceappropriate to the source language.

Debugging is configured by creating a debug script for the packages to be tested. One of the primaryobjectives of this feature is to enable you to perform a debug walk-through executing code, and capture yourstack trace for direct conversion into a Sequence diagram. This is a great way to document and understandwhat your program is doing during its execution phase.

2.1 System Requirements

Important:

Please read the information provided in this topic.

Prerequisites

Creation of a Package Build Script and configuration of the Debug command in that script.

Note:

Microsoft operating systems, Windows Vista and later - Currently, you can debug under these operatingsystems only if the User Account Control (UAC) feature of the systems is turned off.

This restriction will be removed at a future date.

Supported Platforms

Enterprise Architect supports debugging on these platforms:

.Net

· MicrosoftÔ .NET Framework 1.1 and later

· Language support: C, C#, C++, J#, Visual Basic

Note:

Debugging under Windows Vista (x64) - If you encounter problems debugging with Enterprise Architect on a64-bit platform, you should build a Win32 platform configuration in Visual Studio; that is, do not specify ANY-CPU, specify WIN32.

Java

· Java 2 Platform Standard edition (J2SE) version 5.0

· J2EE JDK 1.4 and above

· Requires previous installation of the Java Runtime Environment and Java Development Kit from SunMicrosystemsÔ.

Debugging is implemented through the Java Virtual Machine Tools Interface (JVMTI), which is part of the JavaPlatform Debugger Architecture (JPDA). The JPDA is included in the J2SE SDK 1.3 and later.

Windows for Native Applications

Enterprise Architect supports debugging native code (C, C++ and Visual Basic) compiled with the MicrosoftÔ

10

24

Page 28: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | System Requirements24

Visual Execution Analyzer in Enterprise Architect

compiler where an associated PDB file is available. Select Microsoft Native from the list of debuggingplatforms in your package script.

You can import native code into your model, and record the execution history for any Classes and methods.You can also generate Sequence diagrams from the resulting execution path.

Note:

Enterprise Architect currently does not support remote debugging.

2.1.1 Enabling Debugger on Windows Vista and Windows 7

The Microsoft operating systems Windows Vista and Windows7 provide User Account Control (UAC) tomanage security for applications. You can turn this feature on or off.

When UAC is turned on, debugging on these systems with the Visual Execution Analyser in EnterpriseArchitect fails. To enable the Visual Execution Analyser to successfully debug applications, you must runEnterprise Architect as an administrator. To do this, follow the step below:

1. Before you run Enterprise Architect, right-click on the Enterprise Architect icon on the desktop andselect the Run as administrator option.

Alternatively, edit or create a link to Enterprise Architect and configure the link to run as an administrator;follow the steps below:

1. Right-click on the Enterprise Architect icon and select the Properties menu option. The EnterpriseArchitect Properties dialog displays.

Page 29: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | System Requirements 25

© 1998-2009 Sparx Systems Pty Ltd

2. Click on the Advanced button. The Advanced Properties dialog displays.

3. Select the Run as administrator checkbox.

4. Click on the OK button, and again on the Enterprise Architect Properties dialog.

Page 30: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger26

Visual Execution Analyzer in Enterprise Architect

2.2 Use the Debugger

The debugging components of Enterprise Architect comprise the Debug window and a series ofsubordinate debugger windows, which you can display either from the Debug window or separately using theView | Debug & Profile menu option. You can then dock and combine the windows to suit your workingrequirements; see the Arrange Windows and Menus section in Using Enterprise Architect - UML ModelingTool.

You use the debugger windows in conjunction with the Source Code viewer, in which the code beingdebugged is displayed; see the Dockable Windows section in Using Enterprise Architect - UML Modeling Tool.

To display the Debug window, either press [Alt]+[8] or select the View | Debug & Profile | Debugger menuoption.

The second toolbar icon (the blue arrow) is the Run debugger button; if at least one script has beenconfigured for the currently selected package (as identified in the Scripts folder), this button is enabled. If ascript has not been created or is incomplete, all buttons are disabled and debugging remains unavailable.

As Build Scripts are linked to a package, selecting another package in the Project Browser also changesthe active Build Script and, naturally, the target to be debugged.

Breakpoints are recorded against the package also, and these update depending on which package isselected. You should set and enable breakpoints before starting the debugger.

28

7

29

Page 31: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger 27

© 1998-2009 Sparx Systems Pty Ltd

Start The Debugger

To start debugging click on the Run button or press [F6].

The figure below shows the Source Code window for a .NET application written in C#, where the debuggerhas been invoked.

The blue arrow and pink highlight indicate the line of execution, halted at a breakpoint.

When the debugger is at a breakpoint the other information is presented in the various windows related to the Debug window. For example, the Stack window displays the stack frames for any thread at a breakpoint,and the Locals window displays any variables within the scope of the thread's current stack frame.

Stop the Debugger

To stop debugging click on the Stop button in the Debug window toolbar, or press [Ctrl]+[Alt]+[F6].

Notes:

In most situations, the debugger ends:

· when it encounters breakpoints (which should be set beforehand)

· when the debug process terminates or

· when the Java Class thread exits.

However, due to the nature of the Java Virtual Machine, it is necessary at times for Java developers to stopthe debugger manually with the Stop button.

32

31

Page 32: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger28

Visual Execution Analyzer in Enterprise Architect

2.2.1 The Debug Windows

The Debug window is available through the View | Debug & Profile | Debugger menu option, or by pressing[Alt]+[8].

The Scripts folder lists the scripts available for the currently-selected package, by default selecting the first inthe list. If you want to execute a different script, select the appropriate checkbox.

The Windows folder lists the other debug windows. Select the checkbox for each window you want to displayin the work area. You can then dock and combine the windows to suit your working requirements; see theArrange Windows and Menus section in Using Enterprise Architect - UML Modeling Tool. The windows arebriefly described below:

· Breakpoints - lists any breakpoints placed in the package source code, along with their status (enabled/disabled), line number, and the physical source file in which they are located

· Locals - shows the local variables defined in the current code segment, their type and value

· Watches - shows the values of static and globally scoped expressions you have entered

· Stack - shows the position of the debugger in the code; clicking on the > button advances the stackthrough the code until the next breakpoint is reached

· Recording History - records any activity that takes place during a debug session; once the activity hasbeen logged, Enterprise Architect can use it to create a new Sequence diagram

· Data Breakpoints - shows local variables that have been marked as breakpoints; changes in the valuesof these variables causes a breakpoint in the debugger

29

31

32

32

34

35

Page 33: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger 29

© 1998-2009 Sparx Systems Pty Ltd

· Output - displays output from the debugger including any messages output by debugged process, suchas writes to standard output

· Modules - displays all the modules loaded during a debug session

· Workbench - enables you to create your own variables and invoke methods

· Search - enables you to search for text in files.

The Breakpoints, Recording Markers and Threads folders list the breakpoints, recording markers and threadsin the selected package. Double-click on any of the items to locate the actual object in the code and highlightthe line of code it marks.

2.2.1.1 Breakpoints

Breakpoints work in Enterprise Architect much like in any other debugger. Adding a breakpoint notifies thedebugger to trap code execution at the point you have specified. When a breakpoint is encountered by athread of the application being debugged, the source code is displayed in an editor window, and the line ofcode where the breakpoint occurred is highlighted.

Selecting a different package in the project affects which breakpoints are displayed.

Note:

The debugger does not stop automatically. It runs to completion unless it encounters a breakpoint.

An Enterprise Architect model maintains breakpoints for every package having a Build Script - Debugcommand. Breakpoints themselves are listed in their own Breakpoints window (View | Debug & Profile |Breakpoints).

Breakpoints are also displayed in an abbreviated form in the Breakpoints folder on the Debug window ([Alt]+[8]).

Breakpoints are maintained in a file according to the format:

36

37

37

42

Page 34: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger30

Visual Execution Analyzer in Enterprise Architect

path\prefix_username.brkpt

where:

· path = The default working directory specified in your Build Script

· prefix = Tree View Node Name / Package name

· username = Host system username of the Enterprise Architect user.

Breakpoint States

DEBUGGER STATE

Running Not running

Bound Enabled

Disabled Disabled

Not bound - this usually means that the DLL is not yetloaded or was not built with debug information

N/a

Failed - this usually means a break could not be set atthis time, and can occur when the source file is neweror older than that used to build the application.

N/a

Add Breakpoints

To set breakpoints for a code segment:

1. Open the model code to debug.

2. Find the appropriate code line and click in the left margin column. A solid red circle in the marginindicates that a breakpoint has been set at that position.

If the code is currently halted at a breakpoint, that point is indicated by a blue arrow next to the marker.

Delete, Disable and Enable Breakpoints

To delete a specific breakpoint, either:

· If the breakpoint is enabled, click on the red breakpoint circle in the left margin of the Source Code Editor

· Right-click on the breakpoint marker in the editor and select the appropriate context menu option, or

· Select the breakpoint in the Breakpoints tab and press [Delete].

You can also delete all breakpoints by clicking on the Delete all breakpoints button on the Breakpoints

window toolbar ( ).

To disable a breakpoint, deselect its checkbox on the Breakpoints window or, to disable all breakpoints, click

Page 35: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger 31

© 1998-2009 Sparx Systems Pty Ltd

on the Disable all breakpoints button in the toolbar ( ). The breakpoint is then shown as an empty grey

circle. Select the checkbox or use the Enable all breakpoints button to enable it again ( ).

2.2.1.2 Locals

Whenever a thread encounters a breakpoint , this window displays all the local variables for the thread atits current stack frame.

The value and the type of any in-scope variables are displayed in a tree, as shown in the following screen:

Local variables are displayed with colored box icons with the following meanings:

· Blue Object with members

· Green Arrays

· Pink Elemental types

· Yellow Parameters

· Red Workbench Instance

29

32

Page 36: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger32

Visual Execution Analyzer in Enterprise Architect

2.2.1.3 Watches

The Watches window is most useful for native code (C, C++, VB) where it can be used to evaluate data itemsthat are not available as Local Variables - items with module or file scope and static Class member items.You can also use the window to evaluate static Class member items in Java and .NET.

To use the Watches window, click on it and press [Insert]. An edit window displays in which you can type thename of the variable to examine.

To examine a static Class member variable in C++, Java or Microsoft .NET enter its fully qualified name. Forexample:

CMyClass::MyStaticVar

To examine a C++ data symbol with module or file scope, just enter its name. Note items are evaluated only ifthe module in whose scope the item resides is currently loaded by the process being debugged.

The names of the items to evaluate persist for the package, so the next time you debug the same project, theitems evaluate automatically whenever a breakpoint occurs.

If necessary, you can delete items using the right-click context menu options inside this window.

2.2.1.4 Stack

The stack view shows all currently running threads. A Stack trace is displayed whenever a thread issuspended, through one of the step actions or through encountering a breakpoint .

· A green or yellow arrow highlights the current stack frame

· A blue arrow indicates a thread that is running

· A red arrow indicates a thread for which a stack trace history is being recorded

· Double-clicking a frame takes you to that line of code in the Source Code Editor; local variables are alsorefreshed for the selected frame.

31

29

Page 37: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger 33

© 1998-2009 Sparx Systems Pty Ltd

Toolbar

- Save Stack to file

- Generate Sequence diagram from Stack (as shown below)

- Copy Stack to recording history

- Stop recording

Page 38: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger34

Visual Execution Analyzer in Enterprise Architect

2.2.1.5 Recording History

This window is used to record any activity that takes place during a debug session. Once the activity has beenlogged, Enterprise Architect can use it to create a new Sequence diagram. For more information see Recording a Debug Session Using Breakpoints .

The columns in this window are as follows:

· Sequence - The unique sequence number

Note:

The checkbox against each number is used to control whether or not this call should be used to create aSequence diagram from this history. In addition to enabling or disabling the call using the checkbox, youcan use context menu options to enable or disable an entire call, all calls to a given method, or all calls toa given Class.

· Threads - The operating system thread ID

· Delta - The elapsed thread CPU time since the start of the sequence

· Method - There are two Method columns: the first shows the caller for a call or for a current frame if areturn; the second shows the function called or function returning

· Direction - Stack Frame Movement, can be Call, Return, State, Breakpoint or Escape (Escape is usedinternally when producing a Sequence diagram, to mark the end of an iteration)

· Depth - The stack depth at the time of a call; used in the generation of Sequence diagrams

· State - The state between sequences

· Source - There are two Source columns: the first shows the source filename and line number of the callerfor a call, or for a current frame if a return; the second shows the source filename and line number of thefunction called or function returning.

· Instance - There are two Instance columns; these columns only have values when the Sequence diagram

59

Page 39: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger 35

© 1998-2009 Sparx Systems Pty Ltd

produced contains State transitions. The values consist of two items separated by a comma - the first itemis a unique number for the instance of the Class that was captured, and the second is the actual instanceof the Class.

For example: supposing a Class CName has an internal value of 4567 and the program created twoinstances of that Class; the values might be:

· 4567,1

· 4567,2

The first entry shows the first instance of the Class and the second entry shows the second instance.

To save a sequence to an XML file, click on the sequence and on the toolbar Save button ( ).

To access an existing sequence file, either:

· Click on the toolbar Open icon ( ), or

· Right-click on a blank area of the screen and click on the Load Sequence From File context menu option.

The Windows Open File dialog displays, from which you select the file to open.

To generate a Sequence diagram from a sequence, click on the sequence and then on the toolbar Create

Sequence Diagram icon ( ).

2.2.1.6 Data Breakpoints

Supported platforms: Microsoft Native (C++,C), Java

The Data Breakpoints window displays data breakpoints, which are breaks in the execution of a process dueto changes occurring in the value of data items.

For example, in the following code, execution has halted at the highlighted line because the value of L haschanged.

Page 40: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger36

Visual Execution Analyzer in Enterprise Architect

Data breakpoints can currently only be set by right-clicking on the variable in the Locals window andselecting the Set Data Breakpoint context menu option. This means that in order to establish a databreakpoint you must first set a normal breakpoint at a point in the code that presents the required scope oflocal variables to choose from.

To delete a data breakpoint from the Data Breakpoints window, right-click on it and select the Clear DataBreakpoint context menu option.

2.2.1.7 Output

During a debug session the Debugger emits messages detailing both startup and termination of session, to itsOutput tab. Details of exceptions and any errors are also output to this tab. Any trace messages such as thoseoutput using Java System.out or .NET System.Diagnostics.Debug are also captured and displayed here.

31

29

Page 41: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger 37

© 1998-2009 Sparx Systems Pty Ltd

2.2.1.8 Modules

The debugger Modules window lists the modules loaded by the process being debugged.

The columns on this window are described below:

Column Use To

Path Determine the file path of the loaded module.

Modified Date Determine the local file date and time the module was modified.

Debug Symbols Establish the debug symbols type, whether debug information is present in themodule and whether line information is present for the module (required fordebugging).

Symbol File Match Check the validity of the symbol file; if the value is false, the symbol file is out ofdate.

Symbol Path Determine the file path of the symbol file, which must be present for debugging towork.

Modified Date Determine the local file date and time the symbol file was created.

2.2.1.9 Workbench

The Workbench is a tool in Enterprise Architect Debugging, enabling you to create your own variables andinvoke methods on them. Stack trace can be recorded and Sequence diagrams produced from theinvocation of such methods. It provides a quick and simple way to debug your code.

38

40

Page 42: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger38

Visual Execution Analyzer in Enterprise Architect

Platforms Supported

The Workbench supports the following workbench platforms:

· Microsoft .NET (version 2.0 or later)

· Java (JDK 1.4 or later)

Note:

The Workbench does not currently support the creation of Class instances written in native C++, C or VB.

Mode

The Workbench operates in two modes:

Idle mode

When the Workbench is in idle mode, instances can be created and viewed and their members inspected.

Active mode

When methods are invoked on an instance, the Workbench enters Active mode, and the variables displayedchange if the debugger encounters any breakpoints. If no breakpoints are set, then the variables do notchange. The Workbench immediately returns to Idle mode.

Logging

The result of creating variables and the result of calls on their methods is displayed in the Debug Outputwindow.

2.2.1.9.1 Workbench Variables

You can create (and delete) workbench variables from any Class in your model. When you do so, you areasked to name the variable. It then displays in the Workbench window. It shows the variable in a tree control,displaying its type and value and those of any members.

39

Page 43: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger 39

© 1998-2009 Sparx Systems Pty Ltd

Workbench Requirements· NET framework version 2 is required to workbench any .NET model.

· The package from which the variable is created must have a debugger configured (see the Debug Tabtopic).

Constraints (.NET)· Members defined as struct in managed code are not supported.

· Classes defined as internal are not supported.

Delete Workbench Variables

You can delete variables using the Delete shortcut menu on any instance on the Workbench. If all instancesare deleted the debugger is shut down, and the Workbench window is closed.

2.2.1.9.2 Create Workbench Variables

Right-click on the required Class node in the Project Browser and select the Create Workbench Instancecontext menu option, or press [Ctrl]+[Shift]+[J]. The menu option is also available from within a Classdiagram.

Naming the Workbench

When you elect to create an instance of a type Enterprise Architect prompts you with the Workbench dialog toname the variable. Each instance name must be unique for the workbench.

Choosing a Constructor

Having given the variable a name, you must now choose which constructor to use.

If you do not define a constructor, or define a single constructor taking no arguments, the default constructoror the defined constructor is automatically invoked.

Otherwise the following dialog displays. Select the constructor from the drop-down list and fill in anyparameters required.

10

Page 44: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger40

Visual Execution Analyzer in Enterprise Architect

2.2.1.9.3 Invoke Methods

On the Workbench window, right-click on the instance on which to execute a method, and select the Invokecontext menu option.

Choose Method

A list of methods for the type are presented in a dialog. Select a method from the list. Note that all methodslisted are public; private methods are not available.

Supply Arguments

In this example, you have created an instance or variable named Rob of type MyClassLibrary.CRobert, andhave invoked a method named AddFriends that takes an array of CPerson objects as its only argument. Whatyou now supply to it are the three other Workbench instances Fred, John and William.

Page 45: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger 41

© 1998-2009 Sparx Systems Pty Ltd

Arguments

In the dialog above, type any parameters required by the constructor.

· Literals as arguments

· Text: abc or "abc" or "a b c"

· Numbers: 1 or 1.5

· Objects as arguments

If an argument is not a literal then you can supply it in the list only if you have already created aninstance of that type in the workbench. You do this by typing the name of the instance as theargument. The debugger checks any name entered in an argument against its list of workbenchinstances, and substitutes that instance in the actual call to the method.

· Strings as arguments

Surrounding strings with quotes is unnecessary as anything you type for a string argument becomesthe value of the string; for example, the only time you should surround strings with quotes is insupplying elements of a string array, or where the string is equal to the name of an existingworkbench instance.

"A b c"

"a b $ % 6 4"

A b c d

As 5 7 ) 2 === 4

· Arrays as arguments

Enter the elements that compose the array, separated by commas.

Type Arguments

String[] one,two,three,"a book","a bigger book"

CPerson[] Tom,Dick,Harry

Page 46: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger42

Visual Execution Analyzer in Enterprise Architect

Note:

If you enter text that matches the name of an existing instance, surround it in quotes to avoid the debuggerpassing the instance rather than a string.

Invoke

Having chosen the constructor and supplied any arguments, click on the Invoke button to create the variable.Output confirming this action is displayed in the Output tab .

2.2.1.10 File Search

The Search window enables you to search for text in code files. You can select to display the results of thesearch in one of two formats:

· List View - each result line consists of the file path and line number, followed by the line text; multiple linesfrom one file are listed as separate entries

· Tree View - each result line consists of the file path that matches the search criteria, and the number oflines matching the search text within that file; you can expand the entry to show the line number and text ofeach line.

36

Page 47: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger 43

© 1998-2009 Sparx Systems Pty Ltd

Search Toolbar

You can use the toolbar options in the Search window to control the search operation. The state of all buttonspersists over time to always reflect your previous search criteria.

The options, from left to right, are as follows:

Option Use to

Search Path listbox

Specify the folder to search.

You can type the path to search directly into the text box, or click on the folder icon toselect the path. Any paths you enter are automatically saved in the list, up to amaximum of ten; paths added after that overwrite the oldest path in the list.

Search Text listbox

Specify the text to look for.

You can type the text directly into the text box or click on the drop-down arrow to selectfrom a previous entry in the list. The search text you enter is automatically saved in thelist when you click on the Search button.

The list box saves up to ten search queries. Search queries added after that overwritethe oldest query in the list.

Search FileTypes list box

Limit the search to specific types of files. You can select multiple file types in a string,separated by either a comma or a semi-colon as shown in the image above.

Search button Begin the search.

During the course of the search all other buttons in the toolbar are disabled. You cancancel the search at any time by clicking on the Search button again.

Case Sensitivitybutton

Toggle the case sensitivity of the search. The tooltip message identifies the currentstatus of the button.

Page 48: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger44

Visual Execution Analyzer in Enterprise Architect

Option Use to

Word Matchbutton

Toggle between searching for any match and searching for only those matches thatform an entire word. The tooltip message identifies the current status of the button.

SubFolder button Toggle between limiting the search to a single path and including all subfolders underthat path. The tooltip message identifies the current status of the button.

Result Viewbutton

Select the presentation format of the search results - List View or Tree View format.

Clear Results button

Clear the results window.

Clear SearchHistory button

Remove all the entries in the Search Path, Search Text and Search File Types listboxes, if required.

Help button Display this Help topic.

2.2.2 The Debug Toolbar

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

Before you begin a debug session, the toolbar appears as shown below:

You begin a debug session by clicking on the Run Debugger icon - the blue arrowhead. The toolbar iconsthen become activated. If the debugger finds a breakpoint, the toolbar appears as shown below:

During execution, the Pause/Resume button displays in blue. If you click on this button to pause execution, itdisplays in red as shown below:

From left to right the toolbar buttons are as follows:

· Debug/Build menu, which provides quick access to the following options:

· Debug - run the debugger

· Build - run package build scripts

· Test - run package test scripts

· Run - run debug

· Package Build Scripts - configure package build scripts

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

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

26

Page 49: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger 45

© 1998-2009 Sparx Systems Pty Ltd

Note:

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

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

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

· Step Through Is most useful while recording a debug session. The button initiates the samebehaviour as the StepOver button, except that it records intermediate method calls made betweenlines. If you are recording and you click on the StepOver button, any method called between linesis not recorded. The Step Through button causes the debugger to step into any method executedat the current line, and any subsequent method called when the button is clicked. The debuggercontinues to step until it arrives back at the next line.

· Step In [Shift]+[F6] Instructs the debugger to try and step over every line of physical code that thethread is executing. However, the debugger ignores any call to a namespace, function class ormethod that does not exist in the model. That is, only code either generated within EnterpriseArchitect or imported into the model is executed. This restriction can be overridden by the package Sequence Recording Options .

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

· Show Execution Point Only enabled when a thread has encountered a breakpoint. The buttondisplays the source code file in an editor window with the current line of code highlighted for thethread 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 window. If no thread is selected, the firstsuspended thread has the focus.)

· Show/Hide lines during recording Disables (green tick) and enables (red cross) update of theeditor window with the current line of executing source code. During automatic recording of athread, time is spent updating the editors with the current line of executing code. To speed upexecution in debugging larger applications, you can disable this highlighting in any editors. Evenwhen Show lines... is enabled, during automatic recording between markers , the executingline is not displayed.

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

2.2.3 Runtime Inspection

During debugging, whenever a thread is suspended at a line of execution, you can inspect member variablesin the Editor window.

To evaluate a member variable, use the mouse to move the cursor over the variable in the Editor window, asshown in the following examples.

19

63 64

Page 50: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Use the Debugger46

Visual Execution Analyzer in Enterprise Architect

2.3 Debug ASP .NET

Debugging for web services such as ASP requires that the Enterprise Architect debugger is able to attach to arunning service. Begin by ensuring that the directory containing the ASP .NET service project has beenimported into Enterprise Architect and, if required, the web folder containing the client web pages. If your webproject directory resides under the website hosting directory, then you can import from the root and includeboth ASP code and web pages at the same time.

The following image shows the project tree of a web service imported into Enterprise Architect.

Page 51: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Debug ASP .NET 47

© 1998-2009 Sparx Systems Pty Ltd

It is necessary to launch the client first, as the ASP .NET service process might not already be running. Loadthe client by using your browser. This ensures that the web server is running. The only difference to a debugscript for ASP is that you specify the attach keyword in your script, as follows:

Page 52: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Debug ASP .NET48

Visual Execution Analyzer in Enterprise Architect

When you start the debugger (click on the Debug window Run button) the Attach To Process dialogdisplays.

26

Page 53: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Debug ASP .NET 49

© 1998-2009 Sparx Systems Pty Ltd

Note that the name of the process varies across Microsoft operating systems.; check the ASP .NET SDK formore information. The image above shows the IIS process w3wp.exe, which is the name of the process thatruns under Windows Vista.

On Windows XP, the name of the process is something like aspnet_wp.exe, although the name could reflectthe version of the .NET framework that it is supporting. There can be multiple ASP.NET processes runningunder XP; you must ensure that you attach to the correct version, which would be the one hosting the .NETframework version that your application runs on. Check the web.config file for your web service to verify theversion of .NET framework it is tied to.

The Debug window Stop button should be enabled and any breakpoints should be red, indicating theyhave been bound.

Note:

Some breakpoints might not have bound successfully, but if none at all are bound (indicated by being darkred with question marks) something has gone out of sync. Try rebuilding and re-importing source code.

You can set breakpoints at any time in the web server code. You can also set breakpoints in the ASP webpage(s) if you imported them.

2.4 Debug COM interop

Enterprise Architect enables you to debug .NET managed code executed using COM in either a Local or anIn-Process server. This feature is useful for debugging Plugins and ActiveX components.

1. Create a package in Enterprise Architect and import the code to debug. See Code Engineering UsingUML Models.

2. Ensure the COM component is built with debug information.

3. Create a Script for the Package.

4. In the Debug tab, you can elect to either attach to an unmanaged process or specify the path to anunmanaged application to call your managed code.

29

Page 54: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Debug COM interop50

Visual Execution Analyzer in Enterprise Architect

5. Add breakpoints in the source code to debug.

Attach to an Unmanaged Process· If an In-Process COM server, attach to the client process or

· If a Local COM Server, attach to the server process.

Click on the Debug window Run button (or press [F6]) to display a list of processes from which you canchoose.

Important:

Detaching from a COM interop process you have been debugging terminates the process. This is a knownissue for Microsoft .NET Framework, and information on it can be found on many of the MSDN .NET blogs.

Page 55: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Debug Another Process 51

© 1998-2009 Sparx Systems Pty Ltd

2.5 Debug Another Process

If the Build Script Debug command is set to the attach keyword, when you click on the Debug Runbutton or press [F6] the Attach to Process dialog displays, from which you can select the process to attach to.

Once Enterprise Architect is attached to the process, any breakpoints encountered are detected by thedebugger and the information is available in the Debug windows.

To detach from a process, click on the Debug Stop button.

2.6 Debug Java Web Servers

This topic describes the configuration requirements and procedure for debugging Java web servers such as JBOSS and Apache Tomcat (both Server configuration and Windows Service configuration) inEnterprise Architect.

The procedure involves attaching to the process hosting the Java Virtual Machine from Enterprise Architect,as summarized below:

1. Ensure binaries for the web server code to be debugged have been built with debug information.

2. Launch the server with the Virtual Machine startup option described in this topic.

3. Import source code into the Enterprise Architect Model, or synchronize existing code.

4. Create or modify the Package Build Script to specify the Debug option for attaching to the process.

5. Set breakpoints .

6. Launch the client.

7. Attach to the process from Enterprise Architect.

Server Configuration

The configuration necessary for the web servers to interact with Enterprise Architect must address thefollowing two essential points:

· Any VM to be debugged, created or hosted by the server must have the Sparx Systems Agent SSJavaProfiler65 command line option specified in the VM startup option (that is: -agentlib:SSJavaProfiler75)

· The CLASSPATH, however it is passed to the VM, must specify the root path to the package source files.

44

53 54 55

51

52

29

Page 56: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Debug Java Web Servers52

Visual Execution Analyzer in Enterprise Architect

The Enterprise Architect debugger uses the java.class.path property in the VM being debugged, to locate thesource file corresponding to a breakpoint occurring in a Class during execution. For example, a Class to bedebugged is called:

a.b.C

This is located in physical directory:

C:\source\a\b

So, for debugging to be successful, the CLASSPATH must contain the root path:

c:\source.

Package Script Configuration

Using the Debug tab of the Build Script dialog, create a script for the code you have imported andspecify the following:

· Select the Attach to process radio button, and in the field below type attach.

· In the Use Debugger field, click on the drop-down arrow and select Java.

All other fields are unimportant. The Directory field is normally used in the absence of any Class pathproperty.

Debugging

First ensure that the server is running, and that the server process has loaded the Sparx Systems Agent DLL SSJavaProfiler75.DLL (use Process Explorer or similar tools to prove this).

Launch the client and ensure the client executes. This must be done before attaching to the server process inEnterprise Architect.

After the client has been executed at least once, return to Enterprise Architect, open the source code youimported and set some breakpoints .

Click on the Run Debugger button in Enterprise Architect. The Attach To Process dialog displays.

12 2

29

26

Page 57: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Debug Java Web Servers 53

© 1998-2009 Sparx Systems Pty Ltd

Click on the OK button. A confirmation message displays in the Debug Output window , stating that theprocess has been attached.

The breakpoints should remain enabled (bright red). If the breakpoints fail, and contain either an exclamationmark or a question mark, then either the process is not hosting the SSJavaprofiler75 Agent or the binaries beingexecuted by the server are not based on the source code. If so, check your configuration.

2.6.1 JBOSS Server

Consider the JBoss example below. The source code for a simple servlet is located in the directory location:

The binaries executed by JBOSS are located in the JAW.EAR file in this location:

The Enterprise Architect debugger has to be able to locate source files during debugging. To do this it also

36

Page 58: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Debug Java Web Servers54

Visual Execution Analyzer in Enterprise Architect

uses the CLASSPATH, searching in any listed path for a matching JAVA source file, so the CLASSPATH mustinclude a path to the root of the package for Enterprise Architect to find the source during debugging.

The following is an excerpt from the command file that executes the JBOSS server. Since the Class to bedebugged is at com/inventory/dto/carDTO, the root of this path is included in the JBOSS classpath.

RUN.BAT-------------set SOURCE=C:\Benchmark\Java\JBOSS\Inventory

set JAVAC_JAR=%JAVA_HOME%\lib\tools.jar

if  "%JBOSS_CLASSPATH%" == ""(       set JBOSS_CLASSPATH=%SOURCE%;%JAVAC_JAR%;%RUNJAR%;)else(       set JBOSS_CLASSPATH=%SOURCE%;%JBOSS_CLASSPATH%;%JAVAC_JAR%;%RUNJAR%;)

set JAVA_OPTS=%JAVA_OPTS% -agentpath:"c:\program files\sparx systems\ssjavaprofiler75"

2.6.2 Apache Tomcat Server

This configuration is for the same application as outlined in the JBOSS server configuration topic.

There are two things to notice of importance.

· The Java VM option: -agentpath:c:\program files\sparx systems\ea\ssjavaprofiler75

· The addition to the Class path property of the path to the source code: C:\JBOSS\03b-dao\common\src;

53

Page 59: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Debug Java Web Servers 55

© 1998-2009 Sparx Systems Pty Ltd

2.6.3 Apache Tomcat Windows Service

For users running Apache Tomcat as a WindowsTM service, it is important to configure the service to enableinteraction with the Desktop. Failure to do so causes debugging to fail within Enterprise Architect.

Select the Allow service to interact with desktop checkbox.

2.7 Debug Internet Browser Java Applets

This topic describes the configuration requirements and procedure for debugging Java Applets running in abrowser from Enterprise Architect.

The procedure requires you to attach to the browser process hosting the Java Virtual Machine (JVM) fromEnterprise Architect, as summarized below:

1. Ensure binaries for the applet code to be debugged have been built with debug information.

2. Configure the JVM using the Java Control Panel.

Page 60: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Debug Internet Browser Java Applets56

Visual Execution Analyzer in Enterprise Architect

3. In the Java Applet Runtime Settings panel, click on the View button. The Java Runtime Settings dialogdisplays.

Page 61: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Debug Internet Browser Java Applets 57

© 1998-2009 Sparx Systems Pty Ltd

4. Click on the appropriate entry and click on the OK button to load the Sparx Systems Agent.

5. Import source code into the Enterprise Architect model, or synchronize existing code. (See CodeEngineering Using UML Models.)

6. Create or modify the Package Build Script to specify the Debug option for attaching to theprocess.

5. Set breakpoints .

6. Launch the browser.

7. Attach to the browser process from Enterprise Architect.

Note that the class.path property specified for the JVM includes the root path to the applet source files. This isnecessary for the Enterprise Architect debugger to match the execution to the imported source in the model.

2.8 Generate Sequence Diagrams

With Enterprise Architect you can easily create detailed and comprehensive Sequence diagrams from yourrecorded debug sessions. You can generate a Sequence diagram:

· For a method (operation ) of a specific Class (the simplest process), or

· By stepping through your executing code and recording specific execution traces between breakpoints,either manually or automatically, or between recording markers .

Enterprise Architect takes the recorded stack history captured during one of these runs and automaticallybuilds the Sequence diagram, including compacting looping sessions for easy reading. You can controlaspects of the diagram generation by setting options on the Sequence tab of the Build Script dialog, orafter recording execution traces when the Generate Sequence Diagram dialog displays.

If required, you can prepare your project and debugger to show State transitions in the generatedSequence diagrams.

Before recording execution, you must set up your debugger and run and debug your applicationsuccessfully.

The following diagram illustrates the kind of diagram you can produce by carefully stepping through yourrunning program or letting Enterprise Architect profile it automatically.

5 10

29

58

59

64

17

67

69

4

Page 62: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams58

Visual Execution Analyzer in Enterprise Architect

2.8.1 Record Debug Session For a Method

In the Professional, Corporate, Business and Software Engineering, Systems Engineering and Ultimateeditions of Enterprise Architect, you can automatically generate a Sequence diagram for a method (operation)of a particular Class, using the method's context menu on the Project Browser.

Page 63: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams 59

© 1998-2009 Sparx Systems Pty Ltd

This menu option is enabled when a script has been configured for the package containing the operationmethod.

This is the most straightforward technique for creating a Sequence diagram. The debugger executes theapplication specified in the build script for the parent package, and when the selected method is encounteredduring execution, the debugger records all the activity from that point. When the method exits, the debuggerstops and produces a diagram from the history for that method. If the method is not executed then no diagramis generated.

Note:

If the debugger is already running, the menu option is disabled (grayed). You must stop the debugger tore-enable the menu option.

2.8.2 Record a Debug Session Using Breakpoints

The debugger enables you to record your debug session and create Sequence diagrams from the StackTrace History. Recording can only occur for a given thread. The Debug window record buttons (Record and Autorecord) become enabled whenever a thread is available for recording. This occurs when a threadencounters a breakpoint, and becomes suspended.

For most applications it is typical that you would set breakpoints at the start and end points in the code forwhich to generate the diagram.

You can begin recording in either of the following ways:

· Manual recording for a thread

· Automatic recording for a thread .

The following example shows a debug sequence recorded for a thread executing managed C++ code underMicrosoft .Net 1.1. (For ease of viewing, the Recording History window is shown in two parts; the Methodcolumn is duplicated to link the two parts.)

4

23

29

62

63

Page 64: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams60

Visual Execution Analyzer in Enterprise Architect

Page 65: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams 61

© 1998-2009 Sparx Systems Pty Ltd

Create the Sequence Diagram

Once you have built up a stack trace history, you are then able to create a Sequence diagram from yourresults. To do this, click on the Create Sequence Diagram button on the Debug Toolbar and define yourdiagram . The diagram and related artifacts are placed in an interaction under the package that is runningyour debug session.

67

Page 66: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams62

Visual Execution Analyzer in Enterprise Architect

2.8.2.1 Record For a Thread Manually

Either:

· Click on the Record button, or

· Right-click on the Stack tab to display the context menu, and select the Record option.

Page 67: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams 63

© 1998-2009 Sparx Systems Pty Ltd

Thereafter you must issue debug commands {StepIn, StepOver, StepOut, Stop} manually. Each time youissue a step command and the thread stack changes, the sequence of execution is logged. When you have

finished tracing, click on the Stop button ( ).

Generate the diagram .

2.8.2.2 Record For a Thread Automatically

Either:

· Click on the Autorecord button, or

· Select the Stack window, right-click to display the context menu, and choose the Auto Record option.

The Stack Trace History, Stack window and Source Code Editor dynamically update to reflect the currentexecution sequence for the thread.

Note:

No other threads are recorded, with the exception of entries for thread creation and termination.

Stack Trace Recording ends when the thread ends, or when you click on the Stop button ( ).

Generate the diagram.

67

67

Page 68: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams64

Visual Execution Analyzer in Enterprise Architect

2.8.3 Recording Markers

Trace marking is a feature that enables you to silently record code executed between two points, andincorporate it in a Sequence diagram. The feature also enables you to capture the execution of multiplethreads. It can be particularly useful in capturing event driven sequences (such as mouse and timer events)without any user intervention.

The recording markers are breakpoints; however, instead of stopping, the debugger behaves according to thetype of marker. If the marker is denoted as a recording start point, the debugger immediately begins to traceall executed calls from that point for the breaking thread. Recording is stopped again when either the threadthat is being captured terminates or the thread encounters a recording stop point.

Recording markers are set in the source code editor. If you right-click on the breakpoint margin at the point tobegin recording, a context menu displays:

Select the Add Start Recording Marker option, then right-click on the breakpoint margin at the point to stoprecording and select the Add End Recording Marker context menu option. The markers are shown below:

Page 69: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams 65

© 1998-2009 Sparx Systems Pty Ltd

When the debugger is run it continues to run the thread, recording a stack history, until either the Stop markeris encountered or the thread terminates, unlike normal breakpoints where the debugger halts and displays theline of code.

Generate the diagram.

Stack Auto-Capture Marker

(Native Code only.) Stack markers enable you to capture any unique stack traces that occur at a point in anapplication. To insert a marker at the required point in code, right-click on the line and select the Add StackAuto Capture Marker context menu option.

67

Page 70: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams66

Visual Execution Analyzer in Enterprise Architect

Each time the debugger encounters the marker it performs a stack trace. If the stack trace is not in therecording history, it is copied. The application then continues running. Stack markers provide a quick anduseful picture of where a point in an application is being called from.

Generate the diagram. 67

Page 71: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams 67

© 1998-2009 Sparx Systems Pty Ltd

2.8.4 Generate the Sequence Diagram

Once you have built up a stack trace history using breakpoints , you can create a Sequence diagram from

your results. To do this, click on the Generate Sequence Diagram button ( ) on the Stack windowtoolbar. The Generate Sequence Diagram dialog displays.

The dialog also displays automatically at the end of a debug recording session , when a thread you arerecording terminates or the program finishes.

Complete the fields as follows:

59

32

63

Page 72: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams68

Visual Execution Analyzer in Enterprise Architect

Option Use to

Name Type in the diagram name; this field defaults to the name of the StateMachine.

Include state information ifavailable

Include any State transitions detected during the debug run in the Sequencediagram produced.

The checkbox is enabled only if the Capture State Transitions UsingConstraint option has been enabled for the Package Script prior todebugging.

Highlight invalidtransitions

Mark with a red border any state transitions detected that are illegal for theState Machine.

The checkbox is enabled only if Include state information if available isselected.

Click on the OK button. Your diagram and related artifacts are placed in an interaction under the package thatis running your debug session.

71

Page 73: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams 69

© 1998-2009 Sparx Systems Pty Ltd

2.8.5 Include State Transitions

Overview

You can generate Sequence diagrams that show transitions in state as a program executes. The illustrationbelow shows a simple project that has, in its State Machine, a number of States that correspond to colorvalues of the Painter Class member variable Painter.1.

Page 74: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams70

Visual Execution Analyzer in Enterprise Architect

Showing State transitions on your debug-generated Sequence diagrams is optional; you set an option in thepackage script associated with the Class for which you intend to record States.

Note:

If you do not have a package script for the Class or package you must create one. Sequence diagrams canonly be generated for a package that has been configured for debug.

Next, you create a State Machine under the Class. On the State Machine you create the State elements thatcorrespond to any states to be captured for your Class. The debugger evaluates your States by checking constraints on the States you create. The States on this diagram are then used by the debugger and Statetransitions are incorporated into the diagram. These procedures are explained in the subsequent sections,with reference to the following figure:

Page 75: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams 71

© 1998-2009 Sparx Systems Pty Ltd

This figure shows the Class Painter with a State Machine called Compound. It has a child diagram also calledCompound, on which the States {Grey,Lime,Olive...} are placed.

2.8.5.1 Enable Capture of State Transitions

To enable capture of State transitions on your Sequence diagram, follow the steps below:

1. Select the Package Build Scripts option either from the Build and Run context menu for the packageon the Project Browser, or from the Debug Workbench toolbar drop down menu.

2. Open your build script and select the Sequence Diagram Recording tab.

3. Ensure the Capture state transitions using constraint checkbox is selected.17

Page 76: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams72

Visual Execution Analyzer in Enterprise Architect

4. Click on the drop-down arrow and select the required constraint type to limit the states captured by thedebugger to those having constraints of that type. If you select <any> then any state found for theClass-associated State Machine is included in recording.

2.8.5.2 Create a State Machine and States

Create State Machine

Open a diagram in the required package and drag a State Machine element from the Enterprise Architect UMLToolbox. In the Project Browser, drag the State Machine under the Class it represents. The State Machineitself has an empty child diagram. Open that diagram.

Create States

The following illustration shows the States on the example State Machine Compound from the Class Painter,as shown in the Overview .

In order to evaluate a State for any object you must have a way to link the State to the Class of the object. Youdo this by adding constraints to the State. Each constraint is in effect a condition on member variables of

69

73

Page 77: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams 73

© 1998-2009 Sparx Systems Pty Ltd

the Class.

2.8.5.3 Add Constraints

The State Properties dialog below is for the State Turquoise. The Constraints tab is open to show how theState is linked to the Class Painter. A State can be defined by a single constraint or by many; in the examplebelow the State Turquoise has two constraints.

The Painter Class has a member called Paint of type Ccolour. The Paint member has two member variablescalled primary and secondary. These variables are enums. The values of constraints can only be comparedfor elemental, enum and string types. In native code, equivalence of Class objects is only possible for pointertypes.

What this constraint means is:

· when an instance of the Painter Class exists and

· its member variable Paint's member variable primary has the enum value Blue and

· the member variable secondary has the enum value Green then

· this State is evaluated to true.

You can see the member variables for these constraints in the following illustration of the Class Painter,

Page 78: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Debugging | Generate Sequence Diagrams74

Visual Execution Analyzer in Enterprise Architect

expanded to show members. Notice the enumeration TColor values. These are the values tested in theconstraints in the State Properties dialog above.

Operators in Constraints

There are two types of operators you can use on constraints to define a State:

· Logical operators AND and OR can be used to combine constraints

· Equivalence operators {= and !=} can be used to define the conditions of a constraint.

All the constraints for a State are subject to an AND operation unless otherwise specified. You can use the ORoperation on them instead, so you could rewrite the constraints in the earlier example as:

Paint.primary=Blue ORPaint.secondary=Green

Below are some examples of using the equivalence operators:

Paint.primary!=Blue ANDPaint.secondary!=Green

Paint.primary=Blue ORPaint.primary=Green

Person.FirstName=JohnPerson.LastName=Carpenter

Note:

Quotes around strings are optional. The comparison for strings is always case-sensitive in determining thetruth of a constraint.

73

Page 79: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Unit Testing | 75

© 1998-2009 Sparx Systems Pty Ltd

3 Unit Testing

Enterprise Architect supports integration with unit testing tools in order to make it easier to develop goodquality software.

Firstly, Enterprise Architect helps you to create test Classes with the JUnit and NUnit transformations (see theMDA Transformations User Guide). Then you can set up a test script against any package and runit. Finally, all tests results are automatically recorded inside Enterprise Architect.

3.1 Set Up Unit Testing

In order to use unit testing in Enterprise Architect, you must first set it up. This happens in two parts.

Firstly the appropriate tests must be defined . Enterprise Architect is able to help with this. By using theJUnit or NUnit transformations and code generation (see Code Engineering Using UML Models) you cancreate test method stubs for all of the public methods in each of your Classes.

The following is an NUnit example in C# that is followed through the rest of this topic, although it could also beany other .Net language or Java and JUnit.

[TestFixture]public class CalculatorTest{

[Test]public void testAdd(){

Assert.AreEqual(1+1,2);}

[Test]public void testDivide(){

Assert.AreEqual(2/2,1);}

[Test]public void testMultiply(){

Assert.AreEqual(1*1,1);}

[Test]public void testSubtract(){

Assert.AreEqual(1-1,1);}

}

This code can be reverse engineered into Enterprise Architect so that Enterprise Architect can record all testresults against this Class.

Once the unit tests are set up, you can then set up the Build and Test scripts to run the tests. These scriptsmust be set up against a package.

The sample above can be called by setting up the Package Build Scripts dialog as follows.

75 8 76

77

8

7

Page 80: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Unit Testing | Set Up Unit Testing76

Visual Execution Analyzer in Enterprise Architect

If Enterprise Architect is to handle unit testing, it is important that you select the Capture Output checkboxand select the appropriate Output Parser for the testing. Without doing this you won't see the program outputand therefore you cannot open the source at the appropriate location.

3.2 Run Unit Tests

You can run the test script you set up previously, by selecting the Project | Build and Run | Test menuoption.

The following output is generated.

Notice how NUnit reports that four tests have run, including one failure. It also reports what method failed andthe file and line number the failure occurred at. If you double-click on that error, Enterprise Architect opens theeditor to that line of code.

Page 81: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Unit Testing | Run Unit Tests 77

© 1998-2009 Sparx Systems Pty Ltd

This enables you to quickly find and fix the error.

Enterprise Architect also records the run status of each test as described in Record Test Results .

3.3 Record Test Results

Enterprise Architect is able to automatically record all results from tests by a testing script in EnterpriseArchitect. In order to use this feature, you just reverse engineer the test Class (see Code Engineering UsingUML Models) into the package containing your test script.

Once your model contains your test Class, on the next run of the test script Enterprise Architect adds testcases to the Class for each test method found. On this and all subsequent test runs all test cases are updatedwith the current run time and if they passed or failed as shown in the following illustration.

The error description for each failed test is added to any existing results for that test case, along with thecurrent date and time. Over time this provides a log of all test runs where each test case has failed. This canthen be included in generated documentation and could resemble the following.

Failed at 05-Jul-2006 1:02:08 PMexpected: <0>but was: <1>

Failed at 28-Jun-2006 8:45:36 AMexpected: <0>but was: <2>

77

75

76

Page 82: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Index78

Visual Execution Analyzer in Enterprise Architect

Index- . -.NET

Debug Another Process 51

Debug Assembly 14

Debug CLR Versions 15

Debug With COM Interop Process 49

Debug, System Requirements 23

Set Up Debug Session 14

- A -Apache Tomcat

Server Configuration 54

Server, Debugging 51

Service Configuration 55

Applets

Java, In Internet Browsers, Debug 55

ASP .NET

Debug 46

Assembly

Debug Session 14

Attach To Process Dialog 51

- B -Breakpoint

Add To Code 29

Delete All 29

Delete Single 29

Disable 29

Enable 29

Folder 28

Format 29

Overview 29

States 29

Window 29

Build And Run 2

Build Script, Create 7

Debug With Enterprise Architect 23

Deploy Script, Create New 16

Manage Compile Scripts 5

Record A Debug Session 59

Run Script, Create New 9

Sequence Diagram 59

Source Code Configuration 4

Unit Test Script, Create New 8

Unit Testing 75

Build Script

Create 7

Dialog 5

Enable Diagnostic Messages, SequenceDiagram Recording Tab 22

Enable Filter, Sequence Diagram Recording Tab 17

Filters 17

Limit Auto Recording to Stack Frame Threshold,Sequence Diagram Recording Tab 21

Options, Sequence Diagram Recording Tab 17

Record Arguments To Function Calls, SequenceDiagram Recording Tab 19

Record Calls To Dynamic Modules, SequenceDiagram Recording Tab 20

Record Calls To External Modules, SequenceDiagram Recording Tab 19

Recursive 16

Wildcard in Filter 17

- C -C++

Set Up Debug Session 11

Capture State Transitions

Debugger Options Tab 69

CLR Versions

Debug .NET 15

Code Engineering

Build And Run 2, 23

Build And Run, Manage Compile Scripts 5

Build And Run, Source Code Configuration 4

Build And Run, Unit Testing 75

Build Script, Create 7

Debug With Enterprise Architect 23

Deploy Script, Create New 16

Run Script, Create New 9

Set Up Debug Session 10

Unit Test Script, Create New 8

COM Interop

Debug .NET 49

Compile Scripts

Manage In Build And Run 5

Configuration

Apache Tomcat Server 54

JBOSS Server 53

Tomcat Server 54

Tomcat Service 55

Constraint

On States, Debugger Generation Of SequenceDiagrams 73

Operators On 73

Page 83: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Index 79

© 1998-2009 Sparx Systems Pty Ltd

Create

Build Script 7

Deploy Script 16

Run Script 9

Sequence Diagram in Debug Session 67

State Machine For Sequence DiagramGeneration, Debugger 72

Unit Test Script 8

- D -Data Breakpoints

Clear 35

Debug Window 35

Set 35

Window 35

Debug

.NET 23

.NET With COM Interop Process 49

Another .NET Process 51

ASP .NET 46

Enable Capture Of State Transitions InSequence Diagram 71

Invoke Methods, Workbench Window 40

Java 23

Java Applets In Internet Browsers 55

Java Web Servers 51, 55

Non Local Variables 32

On Windows7 And Windows Vista 24

Platforms 23

System Requirements 23

Toolbar 44

Under Windows Vista 23

Variables 38

When UAC Is On 24

With Enterprise Architect 23

Debug Session

.NET Assembly 14

.NET CLR Versions 15

Debug C++ 11

Generate Sequence Diagram From 57

Java Setup 12

Java, Attach To VM 13

Microsoft Native Setup 11

Record Automatically For Thread 63

Record For Method 58

Record Manually For Thread 62

Recording Markers 64

Set Up 10

Set Up For .NET 14

Set Up For Java 12

Set Up For Microsoft Native 11

Stack Auto Capture Marker 64

Trace Marking 64

Debug Window 28

Breakpoints Window 29

Data Breakpoints Window 35

File Search Window 42

Locals Window 31

Modules 37

Output 36

Recording History Window 34

Stack Window 32

Watches Window 32

Debug Workbench Window

Workbench 37

Debugger

Capture State Transitions, Options Tab 69

Create State Machine For Sequence DiagramGeneration 72

Enable On Windows7 And Windows Vista 24

Inspect Variables at Run-Time 45

Overview 2

Run-Time Inspection 45

Start 26

Stop 26

System Requirements 23

To Sequence Diagram 59

Using 26

Delete

Workbench Variables 38

Deploy Script

Create 16

Dialog

Attach To Process 51

Build Script 5

- E -Enable Diagnostic Messages

Build Script, Sequence Diagram Recording Tab 22

Enable Filter

Build Script, Sequence Diagram Recording Tab 17

- F -File Search

List View 42

Toolbar 42

Tree View 42

Window, Debugging 42

Folders, Debug

Page 84: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Index80

Visual Execution Analyzer in Enterprise Architect

Folders, Debug

Breakpoints 28

Recording Markers 28

Scripts 28

Threads 28

- G -Generate

Sequence Diagram From Method 58

Sequence Diagram In Debug Session 57

- I -Internet Browser Applets

Java, Debug 55

Invoke Methods

Debugger Work Bench Window 40

- J -Java

Applets In Internet Browsers, Debug 55

Debug Session, Attach To VM 13

Debug, System Requirements 23

Set Up Debug Session 12

Web Servers, Debugging 51

JBOSS

Server Configuration 53

Server, Debugging 51

- L -Limit Auto Recording to Stack Frame Threshold

Build Script, Sequence Diagram Recording Tab 21

Local Variables

Icons 31

Overview 31

Window 31

Locals

Window 31

- M -Member Variables

Inspect During Debugging 45

Method

Generate Sequence Diagram 58

Record Debug Session For 58

Microsoft Native

Set Up Debug Session 11

Modules

Window, Debug 37

- O -Operators

On Constraints 73

Output

Window, Debug 36

- R -Record

Automatic Debug Session For Thread 63

Debug Session 59

Manual Debug Session For Thread 62

Thread, Automatic 59

Thread, Manual 59

Record Arguments To Function Calls

Build Script, Sequence Diagram Recording Tab 19

Record Calls To Dynamic Modules

Build Script, Sequence Diagram Recording Tab 20

Record Calls To External Modules

Build Script, Sequence Diagram Recording Tab 19

Recording History

Window 34

Recording Markers

Folder 28

Set In Debug Session 64

Stack Auto Capture Marker 64

Recursive Builds 16

Run Script

Create 9

Run-Time

Inspection 45

- S -Scripts

Folder 28

Sequence Diagram

Constraints On States, Debugger Generation OfDiagrams 73

Create After Recording Debug Session 67

Create In Debug Session 59

Enable Capture Of State Transitions in DebugSession 71

Page 85: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Index 81

© 1998-2009 Sparx Systems Pty Ltd

Sequence Diagram

Generate From Automatic Debug Record 63

Generate From Manual Debug Record 62

Generate From Method 58

Generate From Recording History 34

Generate In Debug Session 57

Show Transitions In State, Overview 69

State Transition Options, Generate From Debug 67

Sequence Diagram Recording Tab

Build Script, Options 17

Sequence Recording Option 17

Enable Diagnostic Messages 22

Enable Filter 17

Limit Auto Recording 21

Record Arguments To Function Calls 19

Record Calls To Dynamic Modules 20

Record Calls To External Modules 19

Server

Apache Tomcat, Debugging 51

JBOSS, Debugging 51

Tomcat, Debugging 51

Server Configuration

JBOSS 53

Tomcat 54

Service Configuration

Tomcat 55

Set Up

Debug Session 10, 14

For .NET 14

Source Code

Configuration, Build And Run 4

Stack

Create Sequence Diagram From 32

Debug Window 32

Save To File 32

Threads 32

Window 32

Stack Auto Capture Marker 64

State

Constraints, Debugger Generation Of SequenceDiagrams 73

State Machine

Create For Sequence Diagram Generation InDebugger 72

State Transitions

Enable Capture In Sequence Diagram, DebugSession 71

Recorded In Debugger, Overview 69

System Requirements

For Debug 23

- T -Threads

Folder 28

Threads, Debug

Stack Window 32

Tomcat

Server, Configuration 54

Server, Debugging 51

Service Configuration 55

Toolbar

Debug 44

File Search, Debugging 42

Trace Marking

In Debug Session 64

- U -UAC

And Debugging 24

Unit Test

Run 76

Unit Test Script

Create 8

Unit Testing

Create Build and Test Scripts 75

Define Tests 75

In Build And Run 75

Record Test Results 77

Set Up 75

- V -Variable

Debug 38

Visual Analyzer

Overview 2

VM

Attach To In Java Debug Session 13

- W -Watches

Window 32

Web Server

Java 51

Window

Breakpoints 29

Data Breakpoints 35

Page 86: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Index82

Visual Execution Analyzer in Enterprise Architect

Window

Debug 28

File Search, Debugging 42

Locals 31

Modules, Debug 37

Output, Debug 36

Recording History 34

Stack 32

Watches 32

Workbench Debugger, Invoke Methods 40

Windows

Service, Apache Tomcat 55

Windows Vista

Enable Debugger 24

Windows7

Enable Debugger 24

Workbench

Debug Workbench Window 37

Debugger Window, Invoke Methods 40

Supported Platforms 37

Variable Arguments 39

Variable Constructors 39

Variables, Create 39

Variables, Delete 38

Variables, Description 38

Variables, Requirements 38

Page 87: Visual Execution Analyzer in Enterprise Architect · 4 Setup for Build and Run | Visual Execution Analyzer in Enterprise Architect 1 Setup for Build and Run In Enterprise Architect,

Visual Execution Analyzer inEnterprise Architect

www.sparxsystems.com