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
<create name="$var1$" type="string" value="'original'" />
<trace type="SYSOUT" value="'Before update: '+$var1$" />
<varupdate name="$var1$" value="'updated'" />
<trace type="SYSOUT" value="'After update: '+$var1$" />
The code shown in the figure above prints the following text to the 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 braces {} that contain both the variable name and the contents of the variable.