SuiteScript Tutorial - Debugging User Event Script 2.0, 2.1 | SuiteScript Debugger and Browser Tools

Опубликовано: 30 Сентябрь 2024
на канале: Sweet Scripts Studios
1,471
23

SuiteScript Debugger, Script Debugger User Event Script
SuiteScript Tutorial - Debugging User Event Script 2.0, 2.1 | SuiteScript Debugger and Browser Tools

Note: To use the Script Debugger and the 2.1 Script Debugger, you must be using a role with SuiteScript permission (Full level).

Debugging deployed scripts: With deployed debugging, you can select an existing script or core plug-in implementation that already has a defined Script Deployment or Plug-in Implementation record. To debug deployed scripts, you must be the script owner, and the status of your script or core plug-in implementation must be set to Testing. For more information, see Debugging Deployed SuiteScript 1.0 and SuiteScript 2.0 Server Scripts and Debugging Deployed SuiteScript 2.1 Server Scripts.

To access the debugger, go to Customization/ Scripting /Script Debugger. You can also go directly to the Debugger domain by entering https://debugger.netsuite.com into the browser address bar. The Debugger domain is available from a production account or a release preview account. If you are already logged in to your NetSuite account, you will not need to enter you account information again to access the Debugger domain.

When you are logged in to the Debugger domain, you will see the Debugger logo at the top of the page:

When you are in the Debugger domain, you can debug SuiteScript 1.0, SuiteScript 2.0, and SuiteScript 2.1 scripts if the following requirements are met:

You must have scripting permission.

You must be the assigned owner of the script.

If you are debugging a script that already has a defined script deployment, the script must be in Testing mode before it can be loaded into the debugger. If you want to debug a script that has already been released into production, you must change the script's status from Released to Testing on the Script Deployment page.



The Debugger domain provides access to both the Script Debugger for SuiteScript 1.0 and SuiteScript 2.0 script debugging and to the 2.1 Script Debugger for SuiteScript 2.1 script debugging. You can use either debugger to debug server scripts and custom plug-ins or to debug on demand.

Client scripts can be debugged using the tools available in your browser. Both form-level and record-level client scripts should be tested on the form/record they run against.

Terms related to debugging

Call Stack

A stack (most recent on top) of all the active functions (and their local variables) called up until the current line of execution.

JavaScript Debugging Pane

The pane, normally on the right side of the Chrome DevTools tab (opened for SuiteScript 2.1 debugging), which displays breakpoints, watches, variables, and the call stack, and includes execution control buttons.

Line Break Point

A user-selected line in source code where program halts execution.

Minify/de-minify

Minified code has had white space and other characters removed from display, so the entire script appears as one long line. This can occur when using the 2.1 Script Debugger. Minified code can be de-minified from within the Debugger. See Using Chrome DevTools.

User Event Break Point

A user event script where program execution should be paused. The user event must be invoked during script execution for the break point to function.

Watch

A variable or expression that is monitored throughout the program's execution in the current scope.

⏱️⏱️VIDEO CHAPTERS⏱️⏱️

00:00 - Intro
00:10 - User Event Script 2.0 Before Load
00:50 - Open Script Debugger
01:30 - Debug Existing Script in NetSuite
02:25 - Trigger User Event Before Load for Debugging
02:52 - Breakpoints
09:20 - User Event Script 2.1 Before Submit
10:50 - Browser Debugger



#suitescript, #suitescriptdebugger, #suitescript2.0, #suitescript2.1, #netsuitesuitescripttutorial, #suitescript1.0, #debugger, #netsuitesuitescript, #scriptdebugger, #writesuitescriptusingchatgpt, #suitescriptwheretogetstartedinnetsuite, #suitescriptide, #suitescriptdeveloper, #suitescript2, #suitescriptpdf, #servicenowscriptdebugger, #learnsuitescript, #suitescriptuserevent, #usereventsuitescript, #suitescriptmodules, #suitescripttraining