SuiteScript Debugger 2.1(video included)

SuiteScript Debugger 2.1(video included)

Introduction

Welcome back! After discussing- Why and When I use NetSuite Debugger: A Developer's View, Setting Up NetSuite Debugger: Dealing with Real-Time Examples and Challenges , NetSuite debugger: Navigating Ad-Hoc Script Debugging this article is the 4th piece in our debugger series.

In this article, we'll talk about how to debug version 2.1 scripts using NetSuite debugger.

We'll keep it short and to the point, focusing only on what you need to know about SuiteScript Debugger 2.1.

Background of SuiteScript Debugger 2.1

Suitescript debugger with ChromeDev tools


  • 2.1 SuiteScript Debugger, introduced in 2020.2 utilizes Chrome DevTools within NetSuite, providing similar functionality to debugging JavaScript in the Google Chrome browser
  • 2.1 SuiteScript Debugger is fully supported in the Chrome browser
  • Chrome DevTools, integrated within the Google Chrome browser, offers web developer tools. When debugging SuiteScript 2.1, only the Console and Sources tabs are supported.

Exploring SuiteScript 2.1 Debugging: A Hands-On Demo


Limitations of Using debugger:

(note: these apply regardless of the script version used in the debugger)

One Script at a time: Can only debug a single script during a session. Trying to debug multiple scripts in different browser windows will result in the same session appearing in both windows

Debugging User's Own Scripts: Users can only debug their own scripts in their current login session. (Personally, I sometimes find myself leaving the script in testing mode, which leads to functionalities not triggering for other users. I often wonder why a functionality isn't working, only to realize it's because I forgot to switch it back to released mode. As developers, it's essential to keep an eye on switching scripts back to released mode once debugging is finished)

Usage Limit:A 1000 unit usage limit applies to all scripts being debugged.

Scripts such as Scheduled scripts have a 10,000 unit limit when running in NetSuite, will throw an error when reaching 1000 units while being debugged

Disabled Email Error Notification: Email error notification is disabled for scripts being debugged using debugger.

Deployed Client Scripts are not supported, Instead, use the 'debugger' keyword in your script and debug directly in the browser.

Debugger Timeouts

For SuiteScript 1.0 and 2.0

  • Two-Minute Idle Timeout: If there's no user action within the debugger for two minutes, it throws an error. You'll need to reload the debugger page to start a new session.
  • Ten-Minute Global Timeout: Even if you perform actions every two minutes, the debugger will still timeout after ten minutes.

For SuiteScript 2.1

Five-Minute Idle Timeout: If there's no user action within the debugger for five minutes, Chrome DevTools disconnects and displays an Idle Timeouts page.

Overall Time Limit:

  • The maximum session time is 20 minutes, and timeouts may trigger specific errors regardless of your activity on the debugger. (Personally, I rarely stay in the debugger for 20 minutes continuously, so this has never been an issue for me)
  • The overall timeout for a 2.1 Script Debugger session can be set using the IDLE_SESSION_TIMEOUT_IN_MINUTES general preference.

Other things to remember

  • Only SuiteScript 2.1 scripts can be debugged using the 2.1 Script Debugger. You cannot use the 2.1 Script Debugger to debug SuiteScript 1.0 or SuiteScript 2.0 scripts.
  • I usually debug Scheduled ,Suitelets, User event using debugger as these are the supported script. For unsupported ones, I tend to take the piece of logic to debug and start adhoc debugging.
  • Also, debugging "Hidden in SuiteBundle" files is not currently supported

Keep an eye on the release notes for any future updates to the NetSuite debugger.

Rajesh kumar

Managing Director at SuitePark InfoTech | NetSuite Solution Provider (Technical and Functional)

11 个月

Hi, you made that video for kids in youtube, so no one can comment on that, if that’s not you wanted then change whenever you find time.

回复
Mohamed Matheen

Senior Desktop Engineer at Carisma Solutions

1 年

It's a good article. This will surely help NetSuite developers ??

回复

要查看或添加评论,请登录

Shobiya G.的更多文章

社区洞察

其他会员也浏览了