Script Debugger Metering and Permissions

The Script Debugger adheres to the following metering and permission restrictions for all SuiteScript 1.0, SuiteScript 2.0, and SuiteScript 2.1 script types:

Also refer to the SuiteScript Governance and Limits help topic for governance limits on script types and API modules.

Idle Timeouts

The SuiteScript Debugger and the 2.1 Script Debugger for all script types have idle timeouts. Your debug session will end if you stop interacting with the debugger, or if you have exceeded the maximum allowed amount for a debug session.

SuiteScript 1.0 and SuiteScript 2.0

There is a two-minute time limit on SuiteScript 1.0 and 2.0 scripts sitting idle in the debugger. If you do not perform some user action in the debugger within the two minutes, the following error is thrown:

  • You have exceeded the maximum allowable idle time for debugging scripts. To debug another script, reload the script debugger page and start a new debugging session.

If you receive this message and you are debugging a deployed SuiteScript 1.0 or SuiteScript 2.0 script, click Go Back. You must then reload your script by clicking Debug Existing.

If you are debugging a SuiteScript 1.0 or SuiteScript 2.0 script in on-demand mode, click Go Back, click in the Debugger text area, and re-type (or copy and paste) your code snippet. See Debugging SuiteScript 1.0 and SuiteScript 2.0 Scripts for information about deployed and on-demand debugging modes for SuiteScript 1.0 and SuiteScript 2.0 scripts.

There is also a ten–minute global timeout on all scripts being debugged. This means that even if you are performing user actions within the Debugger every two minutes, the Debugger will still timeout after ten minutes.

SuiteScript 2.1

A timeout can occur in two ways when using the 2.1 Script Debugger:

  • There has been no user action within the debugger for five minutes. If you do not perform some user action in the debugger within five minutes, Chrome DevTools will disconnect and you will see this message:

    Debugging connection closed notification.

    Clicking Reconnect DevTools does not resume your debug session. You must return to the Script Debugger tab and click the X button. Then click Switch To Editor and click Debug Script to start a new debug session. If you leave the Chrome DevTools tab open, it will be used for the new debugging session. If you close the Chrome DevTools tab, a new one will open when you start a new debugging session.

  • You have reached the overall time limit for a debugger session. You set this time limit using the IDLE_SESSION_TIMEOUT_IN_MINUTES general preference, which sets the maximum time for a 2.1 Script Debugger session, regardless of whether there is user action or not. You can set the IDLE_SESSION_TIMEOUT_IN_MINUTES by going to Setup > General Preferences. Although you can enter a value larger than 20 minutes, a 2.1 Script Debugger session is limited to a maximum of 20 minutes. Note that this preference also sets the timeout for a NetSuite user session (see Setting General Account Preferences).

There are several errors thrown when a 2.1 Script Debugger timeout occurs:

  • An error message “You have exceeded the maximum allowable idle time for debugging scripts. To debug another script, reload the script debugger page and start a new debugging session” will be thrown.

  • DEBUGGER_SESSION_TIMEOUT error will be thrown if the timeout occurred based on the IDLE_SESSION_TIMEOUT_IN_MINUTES general preference value.

  • DEBUGGER_IDLE_TIMEOUT error will be thrown if there has been no user action for five minutes.

If any of these timeouts occur, you can return to the Script Debugger page and click the X button to stop debugging. You can then click Switch to Editor to reload the script and start a new debugging session.

Related Topics

SuiteScript Debugger
Debugging Overview
Debugging SuiteScript 1.0 and SuiteScript 2.0 Scripts
Debugging SuiteScript 2.1 Scripts
Debugging Client Scripts

General Notices