Debug a SuiteScript 2.0 SSP Application

The creation of an SSP Application record enables you to write debugging details to the script execution log when SSP application scripts are run. These details are displayed on the Execution Log subtab of the SSP Application record.

There are two ways to debug SSP applications written in SuiteScript 2.0:

Debug using the N/log Module

            <%@NApiVersion="2.x"%>
<%@ require path="N/log" alias="testLog"%>
<%
    var x = 'value';
    testLog.audit({
        title: 'audit log',
        details: 'value of x is: '+x
    });
    testLog.debug({
        title: 'debug log',
        details: 'value of x is: '+x
    });
    testLog.emergency({
        title: 'emergency log',
        details: 'value of x is: '+x
    });
    testLog.error({
        title: 'error log',
        details: 'value of x is: '+x
    });
%> 

          

Debug without Loading the N/log Module

            <%@NApiVersion="2.x"%>
<%
    var x = 'value';
    log.audit({
        title: 'audit log',
        details: 'value of x is: '+x
    });
    log.debug({
        title: 'debug log',
        details: 'value of x is: '+x
    });
    log.emergency({
        title: 'emergency log',
        details: 'value of x is: '+x
    });
    log.error({
        title: 'error log',
        details: 'value of x is: '+x
    });
%> 

          

Related Topics

Create a SuiteScript 2.0 SSP Application Record
Upload SSP Application Files to the File Cabinet
Set Execute as Role Permissions for .ss and .ssp Files
Select Default SSP File
Make SSP Application available on System Domain
Deploy and Undeploy SSP Applications
Sample SSP Application Code (SuiteScript 2.0)
SuiteScript 2.0 SSP Applications
Create and Use SSP Applications

General Notices