<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Debugging Scripts</title><link>https://community.telligent.com/community/11/w/developer-training/67213/debugging-scripts</link><description /><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>Debugging Scripts</title><link>https://community.telligent.com/community/11/w/developer-training/67213/debugging-scripts</link><pubDate>Wed, 05 Aug 2020 16:18:51 GMT</pubDate><guid isPermaLink="false">22b4aae7-0fb8-44fe-9908-4fc78b1ecd43</guid><dc:creator>Former Member</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/67213/debugging-scripts#comments</comments><description>Current Revision posted to Developer Training by Former Member on 08/05/2020 16:18:51&lt;br /&gt;
&lt;p&gt;Sometimes, when developing a customization using [[Scripting|a scripted customization]], the script doesn&amp;#39;t execute as expected. When this happens, it&amp;#39;s time to start debugging. Verint Community provides a few tools to help diagnose issues.&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h2&gt;&lt;a id="Review_the_Exceptions_Log" name="Review_the_Exceptions_Log"&gt;&lt;/a&gt;Review the Exceptions Log&lt;/h2&gt;
&lt;p&gt;Errors that occur with parsing or execution of script are logged to the Exceptions Log (&lt;strong&gt;Administration &amp;gt; Monitoring &amp;gt; Exceptions&lt;/strong&gt;). Script-based errors are logged under the type &amp;quot;ContentFragmentRenderingError&amp;quot; or &amp;quot;ContentFragmentConfigurationError.&amp;quot;&amp;nbsp;Most errors include the name of the scripted component and embedded file (if applicable). Look for the name of the scripted type you&amp;#39;re developing and review the details to find information about the potential error.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Log_intermediate_data" name="Log_intermediate_data"&gt;&lt;/a&gt;Log intermediate data&lt;/h2&gt;
&lt;p&gt;If there is no syntax or application error, the bug you&amp;#39;re encountering may be related to data expectations in your processing logic. You can add intermediate data logging by including calls to &lt;code&gt;core_v2_exceptions.Log(&amp;#39;MESSAGE&amp;#39;)&lt;/code&gt; periodically within your code to identify where execution is getting and what data is being reviewed.&lt;/p&gt;
&lt;p&gt;Exceptions logged using this API will show in the Exceptions Log (&lt;strong&gt;Administration &amp;gt; Monitoring &amp;gt; Exceptions&lt;/strong&gt;) as the exception type &amp;quot;ContentFragmentRenderingError.&amp;quot; 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.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Use_the_Script_Sandbox" name="Use_the_Script_Sandbox"&gt;&lt;/a&gt;Use the Script Sandbox&lt;/h2&gt;
&lt;p&gt;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 ([[Working with Widget Studio|Widget Studio]], [[Working with Theme Studio|Theme Studio]], and [[Working with Automation Studio|Automation Studio]]) to run snippets of code and review its output immediately.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: best practices&lt;/div&gt;
</description></item><item><title>Debugging Scripts</title><link>https://community.telligent.com/community/11/w/developer-training/67213/debugging-scripts/revision/2</link><pubDate>Thu, 11 Jul 2019 03:34:32 GMT</pubDate><guid isPermaLink="false">22b4aae7-0fb8-44fe-9908-4fc78b1ecd43</guid><dc:creator>Former Member</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/67213/debugging-scripts#comments</comments><description>Revision 2 posted to Developer Training by Former Member on 07/11/2019 03:34:32&lt;br /&gt;
&lt;p&gt;Sometimes, when developing a customization using [[Scripting|a scripted customization]], the script doesn&amp;#39;t execute as expected. When this happens, it&amp;#39;s time to start debugging. Verint Community provides a few tools to help diagnose issues.&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h2&gt;&lt;a id="Review_the_Exceptions_Log" name="Review_the_Exceptions_Log"&gt;&lt;/a&gt;Review the Exceptions Log&lt;/h2&gt;
&lt;p&gt;Errors that occur with parsing or execution of script are logged to the Exceptions Log (&lt;strong&gt;Administration &amp;gt; Monitoring &amp;gt; Exceptions&lt;/strong&gt;). Script-based errors are logged under the type &amp;quot;ContentFragmentRenderingError&amp;quot; or &amp;quot;ContentFragmentConfigurationError.&amp;quot;&amp;nbsp;Most errors include the name of the scripted component and embedded file (if applicable). Look for the name of the scripted type you&amp;#39;re developing and review the details to find information about the potential error.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Log_intermediate_data" name="Log_intermediate_data"&gt;&lt;/a&gt;Log intermediate data&lt;/h2&gt;
&lt;p&gt;If there is no syntax or application error, the bug you&amp;#39;re encountering may be related to data expectations in your processing logic. You can add intermediate data logging by including calls to &lt;code&gt;core_v2_exceptions.Log(&amp;#39;MESSAGE&amp;#39;)&lt;/code&gt; periodically within your code to identify where execution is getting and what data is being reviewed.&lt;/p&gt;
&lt;p&gt;Exceptions logged using this API will show in the Exceptions Log (&lt;strong&gt;Administration &amp;gt; Monitoring &amp;gt; Exceptions&lt;/strong&gt;) as the exception type &amp;quot;ContentFragmentRenderingError.&amp;quot; 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.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Use_the_Script_Sandbox" name="Use_the_Script_Sandbox"&gt;&lt;/a&gt;Use the Script Sandbox&lt;/h2&gt;
&lt;p&gt;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 ([[Working with Widget Studio|Widget Studio]], [[Working with Theme Studio|Theme Studio]], and [[Working with Automation Studio|Automation Studio]]) to run snippets of code and review its output immediately.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Debugging Scripts</title><link>https://community.telligent.com/community/11/w/developer-training/67213/debugging-scripts/revision/1</link><pubDate>Mon, 08 Jul 2019 15:07:06 GMT</pubDate><guid isPermaLink="false">22b4aae7-0fb8-44fe-9908-4fc78b1ecd43</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/67213/debugging-scripts#comments</comments><description>Revision 1 posted to Developer Training by Ben Tiedt on 07/08/2019 15:07:06&lt;br /&gt;
&lt;p&gt;Sometimes, when developing a customization using [[Scripting|a scripted customization]], the script doesn&amp;#39;t execute as expected. When this happens, it&amp;#39;s time to start debugging. Verint Community provides a few tools to help diagnose issues.&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h2&gt;&lt;a id="Review_the_Exceptions_Log" name="Review_the_Exceptions_Log"&gt;&lt;/a&gt;Review the Exceptions Log&lt;/h2&gt;
&lt;p&gt;Errors that occur with parsing or execution of script are logged to the Exceptions Log (&lt;strong&gt;Administration &amp;gt; Monitoring &amp;gt; Exceptions&lt;/strong&gt;). Script-based errors are logged under the type &amp;quot;ContentFragmentRenderingError&amp;quot; or &amp;quot;ContentFragmentConfigurationError.&amp;quot;&amp;nbsp;Most errors include the name of the scripted component and embedded file (if applicable). Look for the name of the scripted type you&amp;#39;re developing and review the details to find information about the potential error.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Log_intermediate_data" name="Log_intermediate_data"&gt;&lt;/a&gt;Log intermediate data&lt;/h2&gt;
&lt;p&gt;If there is no syntax or application error, the bug you&amp;#39;re encountering may be related to data expectations in your processing logic. You can add intermediate data logging by including calls to &lt;code&gt;core_v2_exceptions.Log(&amp;#39;MESSAGE&amp;#39;)&lt;/code&gt; periodically within your code to identify where execution is getting and what data is being reviewed.&lt;/p&gt;
&lt;p&gt;Exceptions logged using this API will show in the Exceptions Log (&lt;strong&gt;Administration &amp;gt; Monitoring &amp;gt; Exceptions&lt;/strong&gt;) as the exception type &amp;quot;ContentFragmentRenderingError.&amp;quot; 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.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Use_the_Script_Sandbox" name="Use_the_Script_Sandbox"&gt;&lt;/a&gt;Use the Script Sandbox&lt;/h2&gt;
&lt;p&gt;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 ([[Working with Widget Studio|Widget Studio]], [[Working with Theme Studio|Theme Studio]], and [[Working with Automation Studio|Automation Studio]]) to run snippets of code and review its output immediately.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>