- Use Incognito Mode for Development:
- During development, open an incognito (private) session in your browser. Insert
nlapiLogExecutionfunctions into your code to visualize data flow and facilitate debugging. Remove these logs when done to avoid performance impact.
- During development, open an incognito (private) session in your browser. Insert
- Handling Catastrophic Errors:
- If your script encounters critical errors, configured
nlapiLogExecutioncalls can trigger emails to you or administrators. Configure recipients in the script record under the Unhandled Errors tab. Notifications activate only for unhandled exceptions.
- If your script encounters critical errors, configured
- Notifications Configuration:
- Define who receives notifications for catastrophic errors. Options include predefined roles or specific email addresses. Adjust these settings in the script record.
- Exceptions and Notification Details:
- Learn more about how exceptions and notifications work in SuiteScript 1.0 Documentation. Understand scenarios triggering notifications, such as missing functions like
customPageInit.
- Learn more about how exceptions and notifications work in SuiteScript 1.0 Documentation. Understand scenarios triggering notifications, such as missing functions like
- Considerations During Debugging:
- SuiteScript 2.0 user event scripts and client scripts cannot run simultaneously for Scriptable Cart. Typically, use SuiteScript 1.0 for user event scripts and SuiteScript 2.0 for client event scripts. Check SuiteScript for Scriptable Cart for details.
- Changes and Open Sessions:
- Be aware that changes made during debugging may not reflect in open sessions or browsers immediately.