Administer > Status and notifications > Server log file > Trace JavaScript execution

Trace JavaScript execution

If you are a Service Manager JavaScript developer and want to trace JavaScript execution invoked from within RAD, specify rtm:3 in the sm.ini configuration file. This enables Service Manager to log tracing information in the Service Manager server log file (default: <Service Manager home>\Server\logs\sm.log).

The following is an example of the log information:

RTE D SCRIPTTRACE: localizeTable.getLocalizedValues entered, line 210
RTE D Parameter type:STRING value:categories
RTE D Parameter type:ARRAY value:{"complaint", "incident", "problem",  "request for change", "request for information"}
RTE D SCRIPTTRACE: localizeTable.getLocalizedValues exited, line 219  elapsed: 110 ms

This example indicates that the getLocalizedValues function in script localizeTable has been invoked, starting from line 210; the execution completes at line 219, which might be the last line of this function; The execution consumes 110 ms in total. In addition, the parameters passed to this function are also dumped into the log file: the first one is STRING type, with a value of "categories"; the other one is an ARRAY, with its parameters enclosed in braces by their order in the array.

Related topics

Server log file

Related topics

Enter a parameter in the sm.ini file