VSCode-ObjectScript-HowTo

Using Visual Studio Code with InterSystems ObjectScript

InterSystems ObjectScript is a programming language that is used in InterSystems databases such as InterSystems IRIS and Caché. Visual Studio Code (VSCode) is a popular text editor that can be used to write and edit ObjectScript code.



Install InterSystems Extensions

Go to the Activity Bar on the far left-hand side and click on the Extensions tap.

Type in the search bar InterSystems and then install the InterSystems ObjectScript Extension Pack . This Extension pack includes:


Set ObjectScript Color Theme

To provide correct color highlighting when working with Objectscript choose a InterSystems Color Theme.


Connect to a Server

After successfully adding a new Server you can see the Server under All Servers.

Tip: You can edit your Server Properties under: ... in the top right corner > Edit Settings > InterSystems: Servers > Edit in settings.json.


Store Credentials

Everytime you close Visual Studio Code and reopen it, it will prompt you a message to log in with your credentials. To avoid this you can store your credentials:

Example:

"default~iris": {
         "webServer": {
            ...
         },
         "username":"<your-username>",
         "description": "Connection to local InterSystems IRIS™ installed with default settings."
      }

Open a Namespace

Open a Namespace via InterSystems Tools

Open a Namespace via the Explorer


Writing ObjectScript Code

Once you have connected to a Namespace, you can begin writing ObjectScript code. Here are the basic steps for doing so:

You can also create other files with the extension .mac, .inc etc.


Use SQLTools

When you want to have a look inside your database without leaving Visual Studio Code, you can use the SQLTools extension.


Next Chapter

Previous Chapter

Overview

by Philipp B.