Skip to main content

Installation

The SA VSCode plugin is available in the Visual Studio Marketplace. To install the plugin you can either click on the install button on the plugin page in the Visual Studio Marketplace, or you can install it directly from within Visual Studio Code.

  1. Open Visual Studio Code.
  2. Click the Extensions icon in the Activity Bar on the left (or Ctrl+Shift+X).
  3. Write "sa-vscode" in the search bar.
  4. Select the sa-vscode extension.
  5. Click install.
  6. When the installation is finished, an "SA" button will appear in the Activity Bar on the left.

sa-vscode-sa-button.png

  1. Configure the path to the SA Engine binary, see instructions below.

Now you you are ready to start coding OSQL and interact with SA Engine! 😀

Configure the path to the SA Engine binary​

To help VS Code find the SA Engine binary, the path must be configured in one of two ways.

Option 1: Set the Windows environment variable​

Open the Control Panel and navigate to "Edit the System Environment Variables". Set the variable SA_ENGINE_HOME to the full path of the sa.engine\bin folder.

Option 2. Set load_dir in the SA VS Code extension settings​

To access the SA VSCode settings:

  1. Go to the Extensions tab (Ctrl+Shift+X) on the Activity Bar
  2. Scroll down to the sa-vscode extension
  3. Click on the cogwheel and choose "Extension settings"

SA VSCode settings.

To specify which SA Engine binary the VSCode extension should run:

  1. Click "Edit in settings.json" under "Sa Engine: Load_dir" in the extension settings
  2. Write the path to the SA Engine bin folder in "saEngine.load_dir": "" (you need to escape "\" in Windows paths)