-
Notifications
You must be signed in to change notification settings - Fork 5
Configuring VS Code for SFDX
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.
SFDX development is performed in a Scratch Org which is an empty Salesforce environment; unlike a sandbox, the Scratch Org will have no data in it when it is created. To ensure data is available in a Scratch Org to support the development and testing efforts data will have to be scripted in, fortunately, Salesforce provides capabilities to support this.
Visual Studio Code can be used by both developers and QA staff alike.
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.
- Setup Dev Hub and G2P in your Salesforce edition
- Navigate to Setup > Settings > Development > Dev Hub
- Move the slider to enable Dev Hub and G2P Packaging
- Download and Install Visual Studio Code
- Install the official Salesforce Extension Pack into Visual Studio Code.
- From a command prompt in Visual Studio Code issue
sfdx force:auth:web:loginto log into the Dev Hub using the CLI, which will authorize you to create scratch orgs.
Note: A good template to use when making a project from scratch: https://github.com/sfdx-isv/sfdx-falcon-template
- Salesforce Visual Studio Code Extensions Home Page
- Quick Start: Visual Studio Code for Salesforce Development
-- Valerie Belova
- Introduction
- Quality Hooks
- Approvals
- Promotion Automation
SFDX Package Development
Developer Machine Setup
Extras