Skip to main content

Frequently Asked Questions

Usage questions

Why don't I see correct syntax colors in my SAS code?

Select File > Preferences > Color Theme and select a SAS color theme.

Why don't I see error or note colors in my SAS log​?

Select File > Preferences > Color Theme and select a SAS color theme.

Can I change the default shortcuts to run SAS code?

To manage shortcuts in VS Code, select File > Preferences > Keyboard Shortcuts. Enter "run sas" in the search box to view the commands that are associated with running SAS code. Hover the mouse pointer over the column to the left of the command to add or edit a shortcut for the command.

Can I reduce the number of autocomplete suggestions I'm getting?

To turn off autocomplete suggestions when you enter a trigger character, such as Space, select File > Preferences > Settings and enter "trigger" in the search box. Clear the Suggest On Trigger Characters checkbox. When this option is disabled, you can still display a code suggestion by entering matched text or by pressing Ctrl+Space.

To change how suggestions are accepted, search for the Accept Suggestion on Enter option. To accept changes only when you press Tab, select off from the drop-down list.

Note: You can specify that any setting changes you make affect only SAS files. For more information, see https://code.visualstudio.com/docs/getstarted/settings#_language-specific-editor-settings

Can I still get word-based suggestions after enabling the SAS extension?

VS Code provides a default word-based autocompletion for any programming language when there is no language extension installed. When a language extension is installed, however, the default autocomplete feature is no longer available. For more information, see https://github.com/microsoft/vscode/issues/21611

Why does it take so long to run SAS code the first time?

A new session must be created the first time you run SAS code. Connection time varies depending on the server connection. Subsequent runs within the session should be quicker.

Connection issues

How do I get my client ID and secret?

SAS administrators can refer to this documentation for how to generate client IDs.

The client ID needs the authorization_code grant type. If you want it to automatically refresh the access token, it also needs the refresh_token grant type.

What do the unable to verify the first certificate or self-signed certificate in certificate chain errors mean when run my code?

You need to manually trust your server's certificate using the steps below:

  1. Get your server's certificate file

    1.1. Access your SAS Viya endpoint with Google Chrome or Microsoft Edge

    1.2. Click the "lock" icon on the left of the URL on the address bar. The site information panel opens.

    1.3. Click "Connection is secure", then click "Certificate is valid". The Certificate Viewer opens.

    1.4. Click the "Details" tab, then click "Export". Select "Base64-encoded ASCII, certificate chain" and save it to a file.

  2. For Mac OS, you can install the certificate file into your Keychain Access and trust the certificate. If you are using another operating system or you don't want to add the certificate to your system, open VS Code Settings > SAS: User Provided Certificates. Enter the full path of the certificate file.

  3. Restart VS Code.

If the steps above do not work, you can bypass the certificate check:

  1. Set the environment variable NODE_TLS_REJECT_UNAUTHORIZED to 0 to bypass the certificate check.

  2. Shut down all VS Code instances and then restart the application with the updated environment variable. If you are connecting to a remote workspace, set the environment variable on the remote system and terminate all VS Code server processes (for example, run ps -aux | grep vscode-server on the remote Linux machine to see the processes).

Why did I get the Invalid endpoint error​?

Please specify the correct protocol. For example, if your SAS Viya server is on https, make sure you included https:// in your endpoint setting.

Why did I get the Unable to parse decrypted password error​?

  • For Microsoft Windows, open the Control Panel and navigate to All Control Panel Items\Credential Manager, click Windows Credentials, Select items that start with vscodesas and click Remove. Restart VS Code.

  • For Mac OS, open Keychain Access, select login keychain and then select Passwords. Right-click any items that start with vscodesas and select Delete. Restart VS Code.

Why did I get the Setup error: Retrieving the COM class factory... error when connecting to SAS 9.4 (remote-IOM)?

Confirm if SAS Integration Technologies Client is successfully installed. Refer to the documentation for details.

I got the See console log for more details error. How do I find the console log?​

Click Help > Toggle Developer Tools from the top menu bar.

Why am I getting blank errors?

Restart your VS Code session.