Setting up the Salesforce Extension Pack takes a few prerequisites and one project step. Once it is in place you authorize an org and start retrieving metadata.
- Install the prerequisites
Install VS Code 1.90 or newer, a supported JDK (21 recommended, or 17 or 11), and Salesforce CLI. The CLI is required even if you never run it directly, because the extensions call it in the background.
- Add the Extension Pack
In the VS Code Extensions view, search for Salesforce Extension Pack and click Install. The single listing installs the whole set, including Apex, SOQL, Aura, Visualforce, and the Apex Replay Debugger.
- Create or open a project
Open the Command Palette and run SFDX: Create Project for a standard layout, or SFDX: Create Project with Manifest if you need a package.xml. Give it a name and pick a folder.
- Authorize an org
Run SFDX: Authorize an Org, choose the login URL, and complete the browser login. This sets your default org so deploy, retrieve, and the Org Browser know where to point.
Point the apex.java.home setting at a supported JDK if the language server cannot find one automatically; JDK 21 is the recommended runtime.
The base pack for everyday Apex, LWC, and metadata work. Start here unless you specifically want bundled third-party tooling.
Adds common third-party extensions used by Salesforce developers on top of the base set. Choose it if you want those preselected rather than installing them yourself.
- No JDK, or an unsupported one, breaks Apex IntelliSense and the test runner. The error usually points at the apex.java.home setting.
- The extensions need Salesforce CLI installed and on your PATH. A missing CLI shows up as commands failing immediately with a not-found error.
- Source tracking only works on scratch orgs and tracking-enabled sandboxes. For production, rely on a package.xml manifest and expect full retrieves rather than deltas.