Step-by-Step Guide to Getting Started with Visual Studio Code for Salesforce
Move Beyond the Browser: Build Salesforce in Visual Studio Code
Most Salesforce work starts in the browser, clicking through Setup. That works well until your org grows. As you add Apex, Lightning Web Components, and more metadata, point-and-click starts to slow you down, and there is no clean way to version, review, or move changes between orgs.
This is where Visual Studio Code (VS Code) comes in. Paired with the Salesforce Extension Pack and the Salesforce CLI, it turns a free code editor into a full Salesforce development environment where you can retrieve, edit, and deploy metadata from one place, and keep everything under source control.
What Exactly Is Visual Studio Code?
Visual Studio Code (VS Code) is a free, lightweight code editor from Microsoft. On its own it is a general-purpose editor. What makes it useful for Salesforce is what you add to it:
The Salesforce Extension Pack – adds Salesforce-aware editing for Apex, LWC, and metadata, plus the Org Browser and command palette actions.
The Salesforce CLI – the engine that lets VS Code authenticate to your org and retrieve or deploy metadata.
Together, these give you source-driven development: your org’s configuration and code live as files on your machine, which you can edit, compare, and manage with version control such as Git.
Who This Is For
You do not need to be a developer to benefit from this. This guide is for:
Admins ready to move beyond point-and-click
Developers who want a proper source-driven workflow
Consultants and Architects who work across multiple orgs
No prior VS Code experience is assumed. If you can install an application and follow steps in order, you can complete this.
Why It Matters
Setting up VS Code properly is the foundation for almost everything modern Salesforce teams do:
Edit Apex, Lightning Web Components, and configuration in one place, without switching between tabs and Setup screens.
Retrieve metadata as XML files you can read, search, and edit directly.
Put your org’s metadata under version control, so teams can track changes, review each other’s work, and roll back when needed.
Create the base environment that AI-assisted tools build on top of later.
What You’ll Set Up in This Guide
This is a hands-on, start-to-finish walkthrough. Here is what you will do, in order:
Install Visual Studio Code for your operating system.
Install the Salesforce CLI, so VS Code can talk to your Salesforce org.
Install the Salesforce Extension Pack inside VS Code.
Get familiar with the VS Code interface – the Activity Bar, Sidebar, Editors, Status Bar, Panel, and Manage menu.
Create your first Salesforce project using “Create Project with Manifest” from the Command Palette.
Understand the project folder structure – force-app, the manifest/package.xml file, and the scripts folder.
Connect VS Code to a Salesforce org – authorize a Developer Edition or Sandbox and set it as your default org.
Work with the Org Browser – view your org’s metadata and retrieve components such as the Account object as XML.
By the end, you will have a working Salesforce development environment connected to your org, and a clear understanding of how the pieces fit together.
Step-by-Step Walkthrough
Want the full guide as a PDF you can keep and follow along offline? Download it below.
What’s Next
With VS Code, the Salesforce CLI, and the Extension Pack in place, you have the foundation for source-driven development: working with Git, managing metadata across orgs, and layering AI-assisted tools on top. This setup is also the starting point for the AI-powered workflows covered in other Academy guides.
References & Useful Links
Download Visual Studio Code – https://code.visualstudio.com/download
Salesforce CLI – https://developer.salesforce.com/tools/sfdxcli
Register a free Developer Edition – https://developer.salesforce.com/free-trials
Followed along and got it working? Or got stuck and figured it out? Leave a comment so others can benefit from your experience 👇