VSCode Intellisense for SuiteScript

Coming from a Microsoft background, I chose VSCode instead of Eclipse as my IDE for SuiteScript development. I have another article on using VSCode + NetSuite-Sync to publish SuiteScript to the cloud. In that article, I failed to mention how to make VSCode aware of the SuiteScript API methods.

First, I’ll point out that when I started NetSuite-Sync was my only option for direct publishing of SuiteScript to the cloud. However, a second option exists today, NetSuite Upload. As of this post, there were only 735 installs of NetSuite Upload, but the limited number of reviews looked very positive.

Personally, I’m happy with NetSuite-Sync. It was quirky to install (see my other post for instructions) but it works great.

What I failed to mention in my previous post was how to make VSCode aware of the SuiteScript APIs. If you don’t do this step, you are forced to refer to the developer guides every time you write an API call.

Here are the 2 things to remember when hooking up VSCode and NetSuite APIs:

  1. Download the API definitions
  2. Add a jsconfig.json file to your workspace

First, the API definitions.

Documents >> Files >> SuiteScripts

Notice the links in the upper right of the screen.

Downloading API Definitions

Pick your flavor of choice and then save that .js file to your VSCode workspace.

Second, create a jsconfig.js file in the same root directory of your VSCode workspace. Mine is super simple.

jsconfig

That’s it! Now when you start typing an API method call, VSCode will help with auto-complete. And when you select a method, VSCode is aware of the parameters and can present some documentation on the fly.

Here is a SuiteAnswers Article that discusses non-Eclipse IDEs.

Working with IDEs Other Than SuiteCloud IDE Plug-ins

 

4 thoughts on “VSCode Intellisense for SuiteScript

  1. happy says:

    Unlike SuiteScript 1.0 API which is just one file SuiteScript 2.0 API are included in one folder. @Kevin, do I need to update the jsconfig.json file to add the path to the API files?

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s