This function allows you to trace the user variables associated with the specified scope. It may be particularly useful when debugging your templates.
The function returns a string containing information about each variable represented in the following form:
variable_name={type: value}
or
variable_name={null}
Parameter:
scope
The scope (context) with which the variable is associated. (See "About User Variables" below.)If this parameter is not specified, the global scope is assumed by default.
namePrefix
The name prefix of the variables to be traced. If not specified, the returned string will contain information about all user variables existing in the specified scope.
Tip:
Use echo()
function to print the variable information on Java console
(i.e. the standard system output), for example:
echo(traceVars())
${include ../../../refs/user_vars.htm}