Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Develop Against Any Org in Visual Studio Code
The latest release of the Salesforce Extensions for VS Code and the Salesforce CLI added an open beta of basic support for developing against non-scratch orgs. This means you can now use VS Code with your
package.xml file against Scratch Orgs, Developer Edition Orgs, etc. This release is limited in functionality as it is an open beta and we suggest you only use it to evaluate features and provide us with feedback - it is not recommended to use in your day to day work yet.
Table of Contents
First, Open VS Code and create a project. To create a project with a manifest run the command
SFDX: Create Project with Manifest.
Alternatively you can use the CLI to create the project.
sfdx force:project:create --projectname myproject --manifest cd mychangeset code .
Next, you will need to authorize the org you will be working with.
If you want to connect to a sandbox org, edit your
sfdx-project.json file to set
https://test.salesforce.com before you authorize the org.
To start the login process, run the command
SFDX: Authorize an Org.
Your browser will open and you can login to your Sandbox, Developer Edition, trial, etc. Once you have authenticated, you can close the browser and return to VS Code.
The new project you created came with a default manifest file located at
manifest/package.xml. Right-click this file and select the command
SFDX: Retrieve Source from Org
After you make code changes, you can deploy these changes to your org by running the
SFDX: Deploy to Org command on either:
- A manifest file.
- A folder
- A file
Note, that the format of the source code is in the new "source" format. This means that you cannot open your existing code from Force.com IDE in VS Code. You either need to convert your code to source format or create a new project and retrieve the code from your org using your existing manifest (
For information on converting to source format and maintaining git history see this blog post.
Bugs and Feedback
To report issues with these features or for anything else related to the Salesforce Extensions for VS Code, open a bug on GitHub. If you would like to suggest a feature, create a feature request on Github.