Debugging and Bundling SSP Applications in NetSuite
Debug and bundle your SSP applications seamlessly with effective SuiteScript logging and SuiteBundler packaging methods.
Debugging and packaging an SSP application is crucial for maintaining robust web store customizations in NetSuite. This process allows developers to ensure their scripts run successfully and can be easily shared across NetSuite accounts.
Debugging Your SSP Application
Once your SSP application is active, debugging is essential to optimize functionality. You can debug your application by executing SuiteScripts and monitoring the Script Execution Log.
Debugging Methods
There are two primary methods for debugging SSP applications written in SuiteScript 2.0:
- Using the
N/logModule: This method loads the logging module for more detailed logging. - Without Loading the
N/logModule: This method relies on global logging capabilities without module imports.
Debugging Using the N/log Module
Here is how you can effectively utilize the N/log module:
1<%@NApiVersion="2.x"%>2<%@ require path="N/log" alias="testLog"%>3<%4 var x = 'value';5 testLog.audit({6 title: 'audit log',7 details: 'value of x is: '+x8 });9 testLog.debug({10 title: 'debug log',11 details: 'value of x is: '+x12 });13 testLog.emergency({14 title: 'emergency log',15 details: 'value of x is: '+x16 });17 testLog.error({18 title: 'error log',19 details: 'value of x is: '+x20 });21%>Debugging Without Loading the N/log Module
If you prefer not to load the N/log module, the following example showcases basic logging.
1<%@NApiVersion="2.x"%>2<%3 var x = 'value';4 log.audit({5 title: 'audit log',6 details: 'value of x is: '+x7 });8 log.debug({9 title: 'debug log',10 details: 'value of x is: '+x11 });12 log.emergency({13 title: 'emergency log',14 details: 'value of x is: '+x15 });16 log.error({17 title: 'error log',18 details: 'value of x is: '+x19 });20%>Bundling Your SSP Application
To share and install your SSP application across different NetSuite accounts, utilize the SuiteBundler. This tool enables you to package your customization easily and deploy it in other environments efficiently.
Important Tips:
- Always test your application thoroughly before packaging.
- Monitor error logs during the debugging phase to understand any issues with script execution.
By following these steps, you can ensure your SSP application is debugged effectively and prepared for bundling to facilitate smooth installations in multiple accounts.
Key Features:
- Efficient logging methods to troubleshoot your applications.
- Easy packaging and sharing with SuiteBundler.
Who This Affects
This information is particularly relevant for:
- Developers working on SuiteCommerce applications.
- Administrators overseeing the customization and deployment of SSP applications.
- Technical teams responsible for debugging and troubleshooting.
Key Takeaways
- Debugging is critical for successful SSP application performance.
- Use
N/logfor enhanced logging capabilities. - Package applications easily with SuiteBundler for installations in other NetSuite accounts.
Frequently Asked Questions (4)
How can I debug a SuiteCommerce SSP application using SuiteScript 2.0?
What happens to existing script deployments when updating bundles with SSP applications?
Do I need a specific feature flag enabled to use SuiteBundler for SSP applications?
Is it possible to package and distribute SSP applications across different NetSuite accounts?
Was this article helpful?
More in SuiteScript
- SuiteScript 2.1 Enhancements in NetSuite February Updates
SuiteScript 2.1 now supports async features and PATCH method. Discover the latest API and SuiteProcurement improvements.
- Custom Tool Script Enhancements in NetSuite
Custom tool scripts in NetSuite gain execution log support and a new management page in February 16, 2026.
- Scheduling Map/Reduce Script Deployments in NetSuite
Learn to schedule map/reduce script submissions, including one-time and recurring options in NetSuite.
- API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
