ūüďĘ Attention Salesforce Certified Trailblazers! Maintain your credentials and link your Trailhead and Webassessor accounts by April 19th. Learn more.
close

Make Visual Studio Code Salesforce Ready

Visual Studio Code has a lot of features that make it a great development environment. In this step we install Salesforce CLI and Salesforce Extensions for VS Code, and set up your Trailhead Playground to enhance what you can do with the IDE.

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.

  1. Download the CLI using the appropriate link below.
  2. Operating System
    Link to Installer
    macOS
    https://sfdc.co/sfdx_cli_osx 
    Windows 32-bit
    https://sfdc.co/sfdx_cli_win 
    Windows 64-bit
    https://sfdc.co/sfdx_cli_win64 
    Debian/Ubuntu 64
    https://sfdc.co/sfdx_cli_linux 
    Download the archive from one of the URLs in the manifest, extract the archive, then run the ./install script.
    Debian/Ubuntu x86
    https://sfdc.co/sfdx_cli_linux_x86 
    Download the archive from one of the URLs in the manifest, extract the archive, then run the ./install script.
  3. Install the CLI through the installer.
  4. Make sure the CLI is properly installed. Open the terminal app in macOS or the Command Prompt in Windows, and enter sfdx.

You should see something like this: 

Usage: sfdx COMMAND
Help topics, type sfdx help TOPIC for more details:
force    tools for the Salesforce developer
help     display help for <%= config.bin %>
plugins  add/remove/create CLI plug-ins
update   update the sfdx CLI
Note

Note

Give your terminal app a moment to return this result. It can take several seconds.

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 the Extensions icon Visual Studio Code's Extension icon..
  3. Enter Salesforce Extension Pack in the search field.  Visual Studio Code search result for Salesforce extension pack.
  4. Click into the card that says Salesforce Extension Pack.
  5. Then in the newly launched window, click the green Install button.  The top of the pack details window with the green Install button.
  6. Close and relaunch Visual Studio Code to complete the installation.
  7. Note

    Note

    Some features, particularly Apex support, in Salesforce Extensions for Visual Studio Code depend on the Java Platform, Standard Edition Development Kit 8 (JDK8). Even if you have another version of Java installed, you need to also install JDK8. Once you install JDK8 you can follow the steps here to configure your setup.

Setup Your Trailhead Playground 

  1. To create a new Trailhead Playground, click the dropdown at the end of this step and select Create a Trailhead Playground.     The Create a Trailhead Playground dropdown in a module's hands-on challenge.
  2. Once you have a Trailhead Playground, click Launch.
  3. Click The Setup gear icon.and select Setup.
  4. Enter Users in Quick Find box and select Users.
  5. Locate your name on the list of users.
  6. Check the box next to your name. Make note of the username. This is the username for your Trailhead Playground.
  7. Click Reset Password(s) and OK. This sends a password reset email to the email address associated with your username. Be sure to check your spam folder if you don't see the email.  Reset your Trailhead Playground password on the Users page in Setup.
  8. Click the link in the email.
  9. Set your password.

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

retargeting