Skip to main content
All CollectionsScripting
Debugging scripts in preview

Debugging scripts in preview

Updated over a month ago

View hidden variable assignment in Preview

  • Preview a chat by clicking on Preview on Web action

  • Hidden variable assignment are visible by default in chat preview

  • To disable assignment alert, click on Hide system alert from more actions in Preview

Debugging Scripts with the Log Function in Preview

The log function allows users to test and debug their scripts by printing values in the preview UI. This helps ensure that scripts behave as expected before they are published.

log(argument1, [argument2, ..., argumentN])

It is advised and considered a good practice to remove any log statements once you are done debugging your script before publishing. Though it will not have any visual effect on the published chat and to a participant (no logs would be surfaced in the UI during an actual engagement, but any log statements in the script would result in recording the logs on Rival servers.

Did this answer your question?