vsforce adds support for Salesforce development to Visual Studio Code, providing features such as syntax-highlighting, auto-completion, code deployment or retrieval, etc. The extension is freely available in the Visual Studio Code Marketplace (see the badges above).
Some features are still incomplete and/or missing, but already we find it quite useful for our day-to-day work. We encourage you to give it a spin, and report any issues you encounter. Even better, we'd be thrilled if you want to fork our repo and submit new functionalities & bugfixes!
In Visual Studio Code, open the Extensions panel and search for vsforce. That's all there is to it!
For most features to work, vsforce needs a live internet connection and the credentials for your Salesforce organization.
Simply add the information in your .settings
file, as per the sample below:
{
"vsforce.organization.username": "username",
"vsforce.organization.password": "password",
"vsforce.organization.securityToken": "token"
}
You can either enter the credentials in your per-project .settings
file, or in your global user settings. For an in depth explanation on how to do this, see User and Workspace Settings.
If needed (ex: when using a sandbox organization), you can also specify the loginUrl
and your default namespace:
{
"vsforce.organization.namespace": "namespace",
"vsforce.organization.loginUrl": "https://test.salesforce.com/"
}
When properly configured, a message will appear in the status bar informing you that the extension is logged to your Salesforce organization.
Open the Command Palette and type vsforce
to see the list of available commands.
Here are some examples of the features the extension provides:
Basic Visualforce language support with code highlighting, code completion, and go-to definition:
Pulls or pushes your whole project to/from your Salesforce organization, based on your package.xml
file you selected.
Compare your local version with the version in your Salesforce organization:
Run SOQL queries on Salesforce and display the result directly in Visual Studio Code.
- Show logs command
- Push file to Salesforce on save (upcoming)
- Apex auto-completion (upcoming)
- Aura support (upcoming)
- Customizable HTML table/JSON view (SOQL) (upcoming)
Please read our Contributing guidelines.