1.7

Table Of Contents
l
The information icon (i) shows that the selector of the script does not produce a result in
the current section.
l
The warning icon (!) appears, for example, when a script refers to an unknown field in
the record set, or when ; is missing after a statement.
l
The error icon (x) displays when the script results in an error, for example, when it uses
an undeclared variable.
In addition to the icons and messages in the Scripts pane, there is another way to see if your
scripts function as expected before generating output:
l
On the Context menu, click Preflight.
Preflight executes the template without actually producing output and it displays any issues
once it’s done.
It will tell, for example, which selectors were not encountered in the template.
Tip
Be aware that scripts run in a specific order (see "The script flow: when scripts run" on page 272).
When one script unintentionally influences the results of another script, changing the order of the
scripts in the Scripts pane may help (see "Changing the order of execution" on page 245).
Testing for speed issues
To measure the time that the execution of scripts will take:
l
On the Context menu, click Profile scripts.
Profiling means running the scripts in the template, with the current record, to see how fast
scripts in the Scripts pane execute. It helps greatly in troubleshooting performance issues
caused by scripts.
After running the Script Profiler you can see in which sections the script has run:
l
Hover the mouse over a value in the column Count to see the number of times that the
script has run, per section.
You can also see the breakdown of the execution time across different execution stages:
Page 249