---
schema_version: "1"
id: 2c50b35b3f64307316e911621487beef5f1fb666517935035d539c123c38a31c
title: Troubleshooting Common Issues
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/sfvscode/guides/troubleshooting.md
canonical_url: https://developer.salesforce.com/docs/platform/sfvscode-extensions/guide/troubleshooting.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a6c5684d2bcccbb173e11bd8ca7614016fa72d566e2674fe8a80b127b1f6cf20
products:
  - Salesforce Extensions for Visual Studio Code
  - salesforcedx
---
# Troubleshooting Common Issues

Here’s some information on how to get past roadblocks that you might encounter while using Salesforce Extensions for VS Code and Agentforce Vibes IDE.

## SFDX Commands Aren’t Available

If you don’t see any SFDX commands in the Command Palette, make sure that you’re working on a Salesforce DX project and that you have the latest version of Salesforce CLI.

1. Make sure that the root directory you have open in VS Code contains an `sfdx-project.json` file. If you haven’t set up a Salesforce DX project, check out [Project Setup](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_workspace_setup.htm) in the _Salesforce DX Developer Guide_.
2. [Update Salesforce CLI](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_update_cli.htm), as described in the _Salesforce DX Setup Guide_.

## Set Your Java Version

See: [Java Configuration](https://developer.salesforce.com/docs/platform/sfvscode-extensions/guide/desktop-install/java-setup.md)

## Set Salesforce CLI Path (Windows)

See [Installing the Salesforce CLI](https://developer.salesforce.com/tools/sfdxcli). After installing Salesforce CLI, if you get the error 'Salesforce CLI is not installed', most likely Salesforce CLI is not added as a path variable. To verify or add Salesforce CLI to your Windows path variable:

1. Search for `Edit the system environment variables`.
   <img align="center" width="80%" height="80%" src="https://developer.salesforce.com/media/vscode/troubleshooting_set_cli_path.1.png" alt="Windows Search">

2. In `System Properties`, click `Environment Variables`.
   <img align="center" width="80%" height="80%" src="https://developer.salesforce.com/media/vscode/troubleshooting_set_cli_path.2.png" alt="System Properties">

3. Under `User Variables`, double-click `Path` .
   <img align="center" width="80%" height="80%" src="https://developer.salesforce.com/media/vscode/troubleshooting_set_cli_path.3.png" alt="User Variables">

4. Verify Salesforce CLI is listed as an entry. Otherwise, click New and paste the path where you installed CLI. For example, `C:\Program Files\Salesforce CLI\bin`
   <img align="center" width="80%" height="80%" src="https://developer.salesforce.com/media/vscode/troubleshooting_set_cli_path.4.png" alt="Path View">

5. Click `OK`.

## Monitor Apex Language Server Output

The Apex Language Server is an implementation of the [Language Server Protocol](https://github.com/Microsoft/language-server-protocol) 3.0 specification. The Language Server Protocol allows a tool (in this case, VS Code) to communicate with a language smartness provider (the server). VS Code uses the Apex Language Server to show outlines of Apex classes and triggers, code completion suggestions, and syntactic errors. To see all diagnostic information from the Apex Language Server, select **View** > **Output**, then choose **Apex Language Server** from the dropdown menu. The diagnostic information gives you insights into the progress of the language server and shows the problems encountered.

## Activate the Apex Language Server

If the Apex features aren’t available, activate the Apex Language Server. In the VS Code menu bar, select **View** > **Output** and select **Apex Language Server** from the dropdown list on the right. If you don't see an "Apex Language Server" entry, the language server didn’t activate.

If the Apex Language Server didn’t activate, ensure that you have:

1. Opened a Salesforce DX project that has a valid `sfdx-project.json` file.
2. Opened the Salesforce DX project as a top-level folder.
3. Installed Java 11 or Java 17; you see a warning if neither version is installed.

If you’ve checked all of the above and nothing is working, check for errors in VS Code itself. In the VS Code menu bar, select **Help** > **Toggle Developer Tools**, click **Console**, and search for relevant messages.

## See Debugger Errors

To see errors generated by the debuggers, add `"trace": "all"` in your `launch.json` file. Then, re-run your scenario to view debugger log lines in VS Code’s Debug Console.

## Improve Deployment Times for Apex Code

If your deployment times for Apex code are slow, your org might have the `CompileOnDeploy` preference set to `true`. For details about this preference, see [Deploying Apex](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_deploying.htm) in the _Apex Developer Guide_.

## Other Resources

For Apex Debugger troubleshooting information, see [Apex Interactive Debugger](https://developer.salesforce.com/docs/platform/sfvscode-extensions/guide/programming-languages/apex/debuggers/interactive-debugger.md).

For general information about VS Code, see the [Visual Studio Code docs](https://code.visualstudio.com/docs).

For troubleshooting information for Salesforce CLI, which powers much of the functionality in Salesforce Extensions for VS Code and Agentforce Vibes IDE, see [Troubleshoot Salesforce DX](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_troubleshoot.htm) in the _Salesforce DX Developer Guide_.
