Debugging Scriptable Cart for SuiteCommerce or SCA

During development, you should open an incognito (private) session in your browser and then insert nlapiLogExecution functions into your code to see the data as it is passed around. Including these nlapiLogExecution functions makes it much easier to debug your script.

You should remove all the calls to log when you are finished debugging as they can have a negative impact on performance if triggered. However, you can leave them in for situations where you must have a log in case things go wrong.

If your script goes catastrophically wrong, these calls can trigger emails to you, a site administrator, or others in your organization. You can configure who receives notifications in the script record by going to the Unhandled Errors tab and selecting from the predefined options, or by specifying individual email addresses.

These settings only trigger notifications if there are unhandled exceptions that prevent the code from running normally. An example would be if your script included a call to a function called customPageInit, but that function did not exist anywhere in the script.

To learn more about what happens when exceptions occur and notification are sent, see SuiteScript 1.0 Documentation.

When debugging, keep these issues and limitations in mind:

Related Topics

Scriptable Cart Fundamentals and Set Up
Start Using Scriptable Cart with SuiteCommerce or SCA
Basic Custom Functions
Best Practices for Using Scriptable Cart with SuiteCommerce or SCA
Scriptable Cart Gift Card Example for SuiteCommerce or SCA

General Notices