Skip to main content
Free Agentforce workshops and AI Certifications: Learn more. Terms and conditions apply.

Make Visual Studio Code Salesforce Ready

Follow Along with Trail Together

Want to follow along with an instructor as you work through this step? Take a look at this video, part of the Trail Together series on Trailhead Live.

(This clip starts at the 7:02 minute mark, in case you want to rewind and watch the beginning of the step again.)

Install the Command Line Interface (CLI)

You can use Salesforce CLI to control the full application life cycle of your Salesforce apps. Through the CLI, you can easily create or connect to environments for development and testing, and synchronize metadata and code between your orgs and a version control system.

See the Salesforce CLI Setup Guide for complete installation instructions and specifically for macOS and Windows.

  1. Install the CLI from Salesforce CLI.
  2. Confirm the CLI is properly installed and on the latest version by running the following command from the command line.
    sf updateYou should see output like Updating CLI....

Install the Salesforce Extension Pack

Now that we have Salesforce CLI installed, we can supercharge Visual Studio Code by installing the Salesforce Extension Pack. The extension pack installs the essential Salesforce extensions all at once, saving you from selecting each one individually.

The extensions provide deep integrations with Salesforce tooling throughout VS Code. You can invoke Salesforce CLI from a variety of places (VS Code menus, shortcut keys, and right-click context menus).

New functionality shows up as you're working, including:

  • Language Services for Apex
  • Language Services for Visualforce
  • Language Services for Lightning Components (Aura and Lightning Web Components)
  • Integrations in the activity bar for Apex tests and Replay Debugger.
  1. Launch Visual Studio Code.
  2. On the left toolbar, click Extensions ().
  3. Enter Salesforce Extension Pack in the search field. Visual Studio Code search result for Salesforce extension pack.
  4. Select Salesforce Extension Pack.
  5. Click Install.
    The top of the pack details window with the green Install button.
  6. Close and relaunch Visual Studio Code to complete the installation.
Note

Some features in Salesforce Extensions for VS Code depend upon the Java Platform, Standard Edition Development Kit (JDK). It requires an installation of either JDK version 21 (Recommended) or JDK version 17 or 11. Once you install a JDK, you can follow the steps here to configure your setup.

Setup Your Trailhead Playground

Let's get started by opening your Trailhead Playground. Scroll to the bottom of this page and click Launch. If you see a tab in your org labeled Get Your Login Credentials, great! Follow the steps below.

If not, from the App Launcher (“”), find and open Playground Starter and follow the steps. If you don't see the Playground Starter app, check out Find the Username and Password for Your Trailhead Playground on Salesforce Help.

  1. Click the Get Your Login Credentials tab and take note of your username.
  2. Click Reset My Password. This sends an email to the address associated with your username.
  3. Click the link in the email.

Enter a new password, confirm it, and click Change Password.

We won't check any of your setup. Click Verify step to go to the next step in the project.

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback