Tracing tab
The Tracing tab lists all traces in the system. Select any trace to view its details.
Start a trace
- Open your script or macro in Settings and maintenance.
- Click Trace script.
- Enter a clear description.
- Optionally, set User filter to trace only runs by a specific user.
- Optionally, enable notifications.
- Optionally, configure sampling frequency, retention settings, and exception-only tracing.
- Select Enabled.
- Click OK.
Inspect a trace
- Click Refresh and select the row from the recent run.
- The left side shows the script, with the current line highlighted.
- The right side shows all variables. Click the ellipse (…) to expand.
- Use the slider or Step buttons to move through the variables and statements.
- Click Return when done.
Call-stack depth
CRMScript keeps track of its current call stack depth, and saves it with the tracing information. Consecutive code lines are usually at the same depth. Staying at a certain depth means that you don’t step into functions being called. Using the call-stack depth, you can do much more advanced stepping when inspecting a trace:- Step back: Go to the previous statement at the current depth.
- Step in: Go to the next frame.
- Step out scope: Exit the current scope (for example, a loop) and go to the next statement.
- Step out: Exit the current function and go to the next statement.
- Step next: Go to the next statement at the same depth or higher.
Manage all traces
- Go to CRMScript > Debug sessions.
- Click Start tracing scripts to turn on all enabled traces.
- Click Stop tracing scripts to pause tracing.
Edit a trace
- In the Tracing tab, select a trace.
- Click Edit trace.
- Update the fields as needed.
- Click OK.
Field reference
Limits and storage
A trace is disabled when it reaches 100 runs or 100 MB of stored data. Delete older runs or wait for automatic nightly cleanup. Re-enable the trace to continue tracing. Consider what you need to trace. The Only trace when it is required setting logs only unhandled exceptions or calls toforceSaveTrace(true). Use this together with notifications to monitor scripts efficiently.