log.debug(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Logs a Debug message.

Debug messages appear on the Execution tab only if the Log Level on the script deployment is set to Debug.

Use this method for scripts in development.

Returns

void

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

Amount of logging in any 60 minute period is limited. See N/log Module Guidelines.

Module

N/log Module

Since

2016.1

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.title

string

required

The text to appear in the Title column on the Execution Log tab of the script deployment.

Maximum length is 99 characters.

If you set this value to null, an empty string (''), or omit it, the word “Untitled” appears for the log entry.

2016.1

options.details

any

optional

The text of the log message, that can include strings, variables, objects, etc.

If the value is a JavaScript object type, JSON.stringify(obj) is called on the object before displaying the value.

NetSuite truncates any resulting string over 3999 characters.

2016.1

Syntax
Important:

The following code snippet shows the syntax for this member. It is not a functional example. For a complete script example, see N/log Module Script Sample.

          //Add additional code 
...
var myValue = 'value';
log.debug({
    title: 'Debug Entry', 
    details: 'Value of myValue is: ' + myValue
});
...
//Add additional code 

        

Related Topics

N/log Module
SuiteScript 2.x Modules
SuiteScript 2.x
Governance on Script Logging
Viewing Script Execution Logs

General Notices