Sometimes, when developing a customization using a scripted customization, the script doesn't execute as expected. When this happens, it's time to start debugging. Verint Community provides a few tools to help diagnose issues.
[toc]
Review the Exceptions Log
Errors that occur with parsing or execution of script are logged to the Exceptions Log (Administration > Monitoring > Exceptions). Script-based errors are logged under the type "ContentFragmentRenderingError" or "ContentFragmentConfigurationError." Most errors include the name of the scripted component and embedded file (if applicable). Look for the name of the scripted type you're developing and review the details to find information about the potential error.
Log intermediate data
If there is no syntax or application error, the bug you're encountering may be related to data expectations in your processing logic. You can add intermediate data logging by including calls to core_v2_exceptions.Log('MESSAGE')
periodically within your code to identify where execution is getting and what data is being reviewed.
Exceptions logged using this API will show in the Exceptions Log (Administration > Monitoring > Exceptions) as the exception type "ContentFragmentRenderingError." You can review the progress that is logged to determine what code to review in more depth or what data was received and compare that to what your code was expecting.
Use the Script Sandbox
If you are having trouble with a specific block of code or specific API call, you can use the script sandbox available in each of the script studios (Widget Studio, Theme Studio, and Automation Studio) to run snippets of code and review its output immediately.