Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Topic |
Prev | Next |
Variable Snapshots
It is possible to take a 'snapshot' of a variable when your program hits a breakpoint and use this snapshot to see how the value of the variable changes at different points in its life. 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 no longer find any more debug information for a member or no more members can be found.
Capture Variable Snapshot
Step |
Action |
See also |
---|---|---|
1 |
In the Code Editor, set two breakpoints: one at the start of a function and another 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' 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' option. A dialog displays that shows the original value from the first snapshot and the current value from the second snapshot as illustrated in this diagram taken from the EA.Example model.
|
Save Variable Snapshot to File
You can save the state of a variable to file using its right-click context menu.
This is an excerpt of the file contents.