Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Variable Snapshots

Snapshots enable you to compare the value of a variable at different points in the life of that variable. You can take a snapshot of a variable when the program is at a breakpoint.

The debugger does not copy the value of the selected variable only; for complex variables it copies the values of the selected variable and of each of its hierarchy of members until it can find no debug information for a member or no more members can be found.

How to

To capture variable snapshots

Step

Action

See also

1

In the Code Editor, set two breakpoints: start at the start of a function and end at the end of the function.

 

Setting Code Breakpoints

2

At the start breakpoint, right-click on a variable in the Locals window and select the Save Variable Snapshot context menu option.

 

View the Local Variables

3

Run the application.

 

 

4

When the end breakpoint is reached, right-click on the variable in the Locals window and select the Compare Variable Snapshots context menu option.

A dialog displays that shows the original value from the first snapshot and the current value from the second snapshot, as illustrated below (this example is taken from the EA.Example model).

VEA-VarSnapshot

 

 

Notes

This facility compares the values of a variable by address; be aware that if there are different threads with different instances of the same variable name, these are not comparable