How to debug a Suitelet in WebStorm

I have a suitelet that starts with

* @NApiVersion 2.x
* @NScriptType Suitelet

define(['N/search', "N/ui/serverWidget","N/record", "N/log"], function(search, ui, record, log) {

var res = onRequest();
var exports = {};

function onRequest(context){
log.audit({title: "Request received"});

var result = findLicenses();
Whenever I try to debug it the Webstorm IDE gives me an error on the define statement - saying it cannot resolve the symbols for N/search, N/ui/serverWidget, N/record and N/log As I am a rookie I would like some pointers in the right direction on how to debug and step code of a Suitelet in Webstorm. I have installed the SuiteCloud IDE plugin, and I can upload and run my Suitelet in Netsuite without problems. So what I want is the ability to debug and step the code in WebStorm so I don't have to use the NetSuite debugger - if possible? Thank you in advance!
Rookie Asked on December 2, 2020 in SuiteScript.
Add Comment
2 Answer(s)

You need to use the debugger, there is no database or modules on your local machine.

Intermediate Answered on December 2, 2020.

I thought the modules would be present since I installed the SuiteCloud IDe plugin. I can also see the modules in WebStorm under “External Libraries”.

RE: How to debug a Suitelet in WebStorm

on December 2, 2020.
Add Comment

Your only choice for debugging suitelet code is the SuiteScript Debugger. This may change in the future when NetSuite successfully completes their new debugger.

Advanced Answered on December 3, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor