Basic Debugging From Netsuite - acumenbrands/rest_suite GitHub Wiki

If you just want some basic feedback during the execution of any of the uploaded & deployed scripts you can use this:

nlapiLogExecution( 'EMERGENCY', "Title", "Details");

Then look in the Execution log for the script that you added this too.

You can also log variable states like this:

var test = '3';
nlapiLogExecution( 'EMERGENCY', "Title", test);

Also you can log array/objects to string like this:

nlapiLogExecution( 'EMERGENCY', "Title", JSON.stringify(resultsBlock));