I was a big fan of Mavensmate and while it is still working I don't like to work with software which is not supported. I find the Salesforce development eco system quite confusing. There seems to be many different tools out there.

Ideally I would like to use emacs for writing apex. I assume this is possible to write some emacs lisp to integrate with the SFDC apis but probably a lot of work. I see Visual Studio Code has good support also.

How can I quickly use Visual Studio Code to write apex code in a Sandbox. I am confused between the SFDX and the FORCE CLI. I didn't find any good guide. Can I use sfdx with normal old fashioned Sandboxes. Please help this noob?

  • 1
    Just a comment I personally love c9 IDE its awesome for the fact that I can download the metadata in my workspace and commit to github from the terminal. I also tried atom with mavensmate but I had the same doubts about mavens future and switched to c9
    – Rao
    Commented Oct 6, 2017 at 16:13
  • What do you want to replace tho? Just because it's not actively maintained, it doesn't mean it's broken. In fact I've seen some commits still being made in their github repo. I am saying this as I am connecting my scratch org to MavensMate for Atom.
    – dzh
    Commented Oct 9, 2017 at 7:03
  • That said, if someone knows a nice plugin to push code on save, I'd appreciate the link :)
    – dzh
    Commented Oct 9, 2017 at 7:18

3 Answers 3


I use these three: SFDX, the Force CLI and ForceCode (a VS Code Plugin).

SFDX can be used to work with Sandbox, Production, and Scratch Orgs.

The Force CLI is a grandparent of the sfdx plugin. SFDX represents a new era of development and is not yet optimised for all possible use cases and takes some time to ingest.

If u want to have a quick start with development / saving against an existing sandbox I strongly recommend ForceCode for VSCode. Set Password + Token and be done.

In the future, the Salesforce VSCode Plugin will surely replace ForceCode sooner or later. But for now, its a fast and easy way to work with existing orgs.

  • What is ForceCode? Do you mean Force IDE plugin for Eclipse?
    – javanoob
    Commented Oct 6, 2017 at 13:47
  • 3
    @javanoob They mean ForceCode, which you use in VS Code (a lightweight extensible IDE based on Visual Studio). FC is notably deprecated because of SFDX, but VSCode will be a viable tech in the future with Salesforces VSCode plugin (as mentioned in the answer). SFDX should probably be your end goal if you use git at all, as suggested here. Whichever IDE you want to use from there is your choice, SFDX will be your toolchain of choice and IDE "support" won't matter as much.
    – sfdcfox
    Commented Oct 6, 2017 at 14:23

You can use SFDX with normal sandboxes, but the exact steps needed will depend on your IDE. From a CLI perspective, you need to do this:

sfdx force:project:create -n "desiredProjectName"
cd "desiredProjectName"
sfdx force:auth:web:login -s -r https://test.salesforce.com

At this point, you will log in through your browser. Afterwards, you can use force:mdapi:retrieve to get metadata, force:mdapi:deploy to deploy metadata, and the other various force: commands can be wired up to the relevant commands. For example, force:visualforce:page:create creates a new Visualforce page.

I'm not terribly familiar with VSCode, but it seems to me that one could write an extension to fully integrate with VSCode, as James Boggs is currently doing (this version only has 3 commands at the moment). All of the stuff you need to work with the CLI is basically functional, it just needs to be hooked up to the IDE.

If you want something that's basically already built for SFDX, use the Force.com IDE 2. Mind you, that means you'll have to use Eclipse (but I don't mind Eclipse), and get all the benefits of using SFDX, and none of the hassle. If you don't like Eclipse, then you're free to bring your own IDE to the table, as I said before, but you'll have to wire everything up yourself, or wait until someone else gets around to it.

  • As of Spring '18, Force.com IDE 2 is discontinued and VS Code is the suggested IDE for Salesforce development Commented Jul 25, 2018 at 8:37

Now you can use VS Code + SFDX with sandboxes and DE orgs, mavensmate will be no longer needed. Here is the link for setup - Use VS Code + SFDX/SalseForce CLI with Sandbox/Developer Org[Beta] Without Mavens mate

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .