Skip to content

Configuring VS Code for SFDX

Valerie edited this page Mar 21, 2019 · 9 revisions

Why Visual Studio Code?

Visual Studio Code (VSCode) is a free, cross-platform code editor with a strong plug-in community which extends its capabilities. Salesforce has created plug-ins to work with VSCode and has become the preferred editor for editing code with SFDX.

Visual Studio Code can be used by both developers and QA staff alike.

VS Code SFDX Setup

Prerequisites

  1. Java 8 Platform, Standard Edition Development Kit Some features in Salesforce Extensions for VS Code depend upon the Java 8 Platform, Standard Edition Development Kit (JDK).
  2. Install the Salesforce CLI

Download VS Code

Getting a workstation setup with VSCode and configured for Salesforce development is a straightforward approach, the steps below outline what is needed to perform regardless if the developer or quality assurance engineer is running on a PC or a Mac.

  1. Download and Install Visual Studio Code
  2. Install the official Salesforce Extension Pack into Visual Studio Code.

Salesforce SFDX Setup

Salesforce needs to be configured to enable SFDX. This is a one-time setup for the Developer org.

  1. Setup Dev Hub and G2P in your Salesforce edition
    1. Navigate to Setup > Settings > Development > Dev Hub
    2. Move the slider to enable Dev Hub and G2P Packaging
  2. From a command prompt in Visual Studio Code issue sfdx force:auth:web:login to log into the Dev Hub using the CLI, which will authorize you to create scratch orgs.

Resources

Trailhead Module:

-- Valerie Belova

Clone this wiki locally