Category Archives: Users

This is the general user of EA – they may be a BA, Developer, Tester – each will have an interest in what it can do to help them do their work

Using EA to debug an EA AddIn

Resolved all my initial VEA configuration issues and very pleased to have got going, not only with exploring the Sparx demos, but also with my own applications.

Testing an EA AddIn

As my day job often involves writing AddIns I was curious to check out if, and how EA, could be used to test an EA AddIn.  Not least as it would help me with

  • Checking my code flows etc
  • Producing better documentation to help with ongoing support

I was pleasantly surprise when this worked.  Although I did experience and I am still exploring a couple of issues with building my AddIn from within EA (I don’t think this is an EA issue), the debugger worked fine.  The key thing to remember is that one instance of EA is running as any other application that could be debugged, in this case from another instance of EA.

So the first step is to configure the Debug setup within the Execution Analyzer.  The set up I used is as illustrated in the screenshot below – the key point is that the debugger will need to “Attach to process” – this will be the EA instance in which the AddIn will be running.

Debug Script For EAAddIn
Debug Script For an EA AddIn

So before we start there will be 2 instances (EA Processes) of EA running.

  • EA1 – which will be the instance that is running the Analyzer
  • EA2 – the instance in which we will run the AddIn under test

So to run a debug session:

  1. Ensure that there are no instances of EA running – ensures that you don’t get mixed up with the different process
  2. Start an instance of EA (this will be) and open the AddIn model with the scripts, source code, etc for the Execution Analyzer
  3. Check the process ID of this instance of EA –  (I used the Process monitor within the sysinternals suite to get the process ID and monitor my system) – Note: EA1 should be the only instance running.
  4. Start another instance of EA(EA2) that will execute the AddIn and take a note of its Process ID
  5. In the Model instance of EA (EA1) start the debug script which will want to “Attach to process”
  6. When requested select the EA process with the process ID for EA2
  7. You are now in a position to debug your AddIn using the EA1 instance – using source code and setting breakpoints, recording information to produce sequence diagrams etc

With respect togetting it going that’s all I needed to do – the next steps are down to the developer and what information they seek to find.

It is worth remembering that the execution of code using the Analyzer is very, very much slower than normal.  First time I didn’t think and it took ages to capture information for my AddIn.  So it is important to be selective about the areas in which you are working and the information you are trying to capture. At least there is probably time to get a cup of coffee when doing a run!

Have fun