Updates

22/04/2026

Using VSCode with SAS Analytics Pro for Containers

SAS Analytics Pro for containers packages powerful SAS analytics tools into a Docker container. But what if you want to use VS Code on your desktop? In this guide, learn how to connect SAS Analytics Pro to your desktop instance...

SAS Analytics Pro for containers packages powerful SAS analytics tools into a Docker container. But what if you want to use VS Code on your desktop? In this guide, learn how to connect SAS Analytics Pro to your desktop instance of VSCode using the new Code Server.

What is SAS Analytics Pro for Containers?

SAS Analytics Pro combines the core strengths of Base SAS®, SAS Studio, SAS/GRAPH®, and SAS/STAT® to create an all-in-one programming environment.  We have previously discussed advantages to the SAS Analytics Pro for Containers previously in posts and we even built a tool to make it even simpler to deploy on your desktop.  Until recently, if you wanted to connect to the container using external tools your options were:
  • The built-in SAS Studio interface.
  • SSH / STDIO which Selerity previously described here.
  • Using the SAS Workspace IOM Interface which until recently, was not well documented.

The Built-In SAS Studio Interface

When you spin up the SAS Analytics Pro container, you don’t just get a backend processing engine; the container ships with a custom SAS Studio interface.
SAS Studio gives you a familiar, web-based graphical interface directly out of the box. Once your container is running, you can easily log in to SAS Studio through your web browser and immediately begin writing code, managing files, and exploring your data. This is incredibly convenient for analysts who want a ready-to-use workspace without any additional setup.
A screenshot of the SAS Studio web application interface that is shipped with SAS Analytics Pro for Containers.
SAS Analytics Pro for Containers SAS Studio Interface.

A Big Leap Forward: SAS Code Server in Version 2026.02

As of the February 2026 release (2026.02), SAS introduced an exciting new capability for developers and analysts: the bundling of code-server and VS Code for the Web directly into the container image.
What does this mean for you? It means you can now launch a full version of Visual Studio Code right inside your web browser (typically accessible at http://localhost:8080/VSCode once the container is running).  This experimental feature gives you the flexibility to use Microsoft’s popular VS Code editor without needing to install anything extra on your computer.
A screenshot of the VSCode for Web interface that ships with SAS Analytics Pro for Containers.
VSCode for Web interface in SAS Analytics Pro for Containers.
If you already use the desktop version of VS Code and prefer to keep your custom themes, extensions, and keyboard shortcuts, SAS Analytics Pro also allows you to connect your external desktop VS Code application directly to the container.
Historically, if we wanted to use VSCode with SAS Analytics Pro, we needed to create either STDIO Connections which removed server browsing capabilities in VSCode or use an IOM connection which was only available on Windows as it required Windows versions of the SAS IOM client.  As of version 2026.03 of the SAS Analytics Pro image now includes a Code Server component which provides a rest based interface to a SAS Workspace session in the container.

Guide: Connecting Desktop VS Code to Your SAS Container

If you prefer to use your own desktop installation of VS Code rather than the browser version, you can easily connect it to your SAS Analytics Pro container. The container supports external connections from the SAS Extension for Visual Studio Code. Here is a simple, step-by-step guide to setting up that connection.  To use this connection type, you will need stable version 2026.02 or higher.

Step 1: Ensure Your Container Exposes the Right Ports

When you or your IT team launch the SAS Analytics Pro Docker container, ensure that the REST API port is published to your local machine. In standard configurations, port 8592 is used for this connection.  This is generally achieved with --publish 8592:8592 from a docker run statement or if using a docker-compose.yaml file add - 8592:8592 in your ports section of the service definition.  You will need to restart any running instances for the change to take effect.

Step 2: Install the SAS Extension

Open your desktop VS Code application, go to the Extensions marketplace, and search for the SAS Extension. Install it.
A screenshot of the SAS Extension available from the VSCode marketplace.
SAS VS Code extension.

Step 3: Configure Your Connection Profile

To tell VS Code how to talk to your SAS container, you need to add a “Connection Profile” to your VS Code settings.
  1. Open your VS Code settings (you can press Ctrl + , on Windows or Cmd + , on Mac).
  2. Click the “Open Settings (JSON)” icon in the top right corner (it looks like a little document with an arrow).
  3. Paste the following configuration snippet into your settings file:
"SAS.connectionProfiles": {
    "activeProfile": "SAS Analytics Pro",
    "profiles": {
        "SAS Analytics Pro": {
            "endpoint": "http://localhost:8592",
            "serverId": "0001",
            "connectionType": "rest",
            "reconnect": true,
            "sasOptions": [
                "-SASUSER /data/.sasuser.apro",
                "-NORSASUSER"
            ]
        }
    }
}

About the Configuration

  • endpoint: This is the “address” of your SAS container. localhost means it’s running on your own computer, and 8592 is the port it uses to listen for instructions from VS Code. If your instance of SAS Analytics Pro is hosted on a remote machine, replace `localhost` with the address provided by your administrator and the port exposed by the administrator for the code server.  TLS / HTTPS can be configured for the SAS Analytics Pro container following this guide. Step 3 should be skipped as it relates to SAS Studio.
  • connectionType: Set to "rest", which is the method VS Code uses to communicate with the container over the web.
  • sasOptions: These are standard SAS options when it starts up your session. In this example, -SASUSER /data/.sasuser.apro tells SAS exactly where to save your personal profile settings inside the container, keeping your workspace organized.  This is the setting that the inbuilt code server connection profile uses.

Step 4: Connect

Once you save your settings, you can use the SAS Extension icon in your VS Code sidebar to connect to the “SAS Analytics Pro” profile. You are now ready to write, run, and analyse your SAS code straight from your favourite desktop editor!  Because we set activeProfile in the settings.json file, you can just navigate to the SAS Extension to view libraries and start executing SAS programs.

 

A screenshot showing the SAS Extension in VS Code. The screenshot shows a SAS Program, a SAS Dataset and SAS ODS results.
The SAS Extension in VS Code.

 

Discover more from Selerity

Subscribe now to keep reading and get access to the full archive.

Continue reading