Can Visual Studio Code be used as an editor for Salesforce without SalesforceDX?

Looks like there is a better way now: Org Development Model with VS Code

This link provides detailed instructions for using the "SFDX: Create Project with Manifest" command which enables connection to a regular sandbox (not a scratch org). This approach gives the ability to push and pull metadata without going through a long multi-step process on every code edit.

This still requires two steps (save file locally and push the entity to Salesforce), but eliminates the requirement to zip, convert and deploy on every save.

If you are receiving errors after following the steps in the above link, here are some additional resources:

Error: “UNSUPPORTED_API_VERSION: Invalid Api version specified on URL.” can be addressed by manually overriding the api version within SFDX itself (separate from "sfdx force --version" and "sfdx plugins" commands). In order to manually set SFDX version, use following command: "sfdx force:config:set apiVersion=44.0" or whatever is appropriate api version. See “UNSUPPORTED_API_VERSION: Invalid Api version specified on URL.”

Also, if you are receiving the "EISDIR: illegal operation on a directory, read" error, this appears to be due to a race error when retrieving entities stored in sub folders such as Lightning components. This can be addressed by removing items that use subfolders in your package file for the initial retrieve and then adding them back in per "EISDIR: illegal operation on a directory, read"


There are some VisualStudio code extensions that can work without needing SFDX workflow. Note that current official plugin also supports working without DX scratch org support.

I created my own extension to supplement Salesforce official visualstudio extension pack; feel free to use that. Note that you will need Salesforce DX CLI and the plugins (Does not mean you need DX scratch org capabilities or hub org). It makes saving apex, vf and lightning components faster and works along side of the official extension.

ForceCode is another option.

There is also a mavensmate extension package for building Salesforce applications.

There are also bunch of few more extensions that you can try and see if it works for what you want.


To use sfdx in classic Dev sandbox developement model, follow the below steps sequentially:

1. Create a sfdx project

  • sfdx force:project:create -n myproject
  • Tip: Connect to your org if you haven't already
  • sfdx force:auth:web:login -s -r https://test.salesforce.com -a <alias>

2. Retrieve your source code using force:mdapi:retrieve

  • Generate the package.xml of your whole sandbox using https://packagebuilder.herokuapp.com/
  • sfdx force:mdapi:retrieve -r <directory> -s -k package.xml

3. Convert mdapi metadata into sfdx metadata structure using force:mdapi:convert

  • Unzip the retrieved package
  • sfdx force:mdapi:convert -r <path to source>
  • by default this should end up in your force-app folder

4. Do your development in VS code

5. Once the development is done,convert sfdx metadata back to mdapi structure: force:source:convert

  • sfdx force:source:convert -r <path to source> -d <path to output dir> -n 'My Package'

6. Finally, use force:mdapi:deploy to deploy your code

  • sfdx force:mdapi:deploy -d <path to source>/ -w -1 -u <alias>

Because it is a sfdx project, you will get the benefit of all the SFDX extensions like CLI, apex, lightning and visualforce support in VS Code. You can find more details about these commands in the development guide