Debugging macro scripts with the <trace> element

When you are debugging, you can use the <trace> element to send text and values to a trace output destination. In particular, if you include the name of a variable in the output, then the macro runtime will display both the name and the value of the variable in the output, enclosed in curly braces {}. Here is an example:
Figure 1. Example of using the <trace> element
<vars>
<create name="$var1$" type="string" value="'original'" />
</vars>
.
.
<actions>
<trace type="SYSOUT" value="'Before update: '+$var1$" />
<varupdate name="$var1$" value="'updated'" />
<trace type="SYSOUT" value="'After update: '+$var1$" />
</actions>
The code shown in the figure above prints the following text to the Java console:
Figure 2. Output from example of using the <trace> element
Before update: +{$var1$ = original}
After update: +{$var1$ = updated}
Notice that the <trace> action displays each variable in curly brackets {} that contain both the variable name and the contents of the variable.