8

I've looked at a bunch of threads here but don't see the answer so I'm posting this question:

It appears that SFDC Extensions for VS Code requires Salesforce DX which is a paid product. Is that accurate?

If that is accurate then given that the Force IDE 2 (eclipse based) is deprecating, what can I use that's officially supported?

1
  • I felt the same. VS Code is not useful for sandbox based development cycle(projects). I think below answers got carried away with your statement that SFDX is paid product. If your project is not based on SFDX then VS Code is no use. I am still using Mavensmate IDE for my project.
    – javanoob
    May 31, 2018 at 23:36

3 Answers 3

6

Salesforce has made clear that their direction for future improvement and development of their toolchain is Salesforce DX. That doesn't mean, however, that you cannot use the more traditional Salesforce toolchain through a variety of avenues.

It's probably useful to make a distinction in terminology here. The sfdx command line tool is one piece, and the Dev Hub + scratch org infrastructure used for DX-style development is another. sfdx can be used to script Metadata API deployments just like the Force.com CLI/CumulusCI/Force.com Migration Tool, but much of what makes it interesting and distinct from those other tools - in particular, development using scratch orgs - is dependent upon being connected to a Dev Hub.

  1. Salesforce DX is not a paid product, per se, but access to a permanent Dev Hub infrastructure currently requires being a paying Salesforce customer. The SFDX Dev Hub is included free with all Enterprise, Performance, and Unlimited edition orgs. Anyone can install the sfdx tool. Rohit Mehta has suggested on Twitter that Dev Hub for Developer Editions are likely coming in Winter '19. Currently, you must use a 30-day Dev Hub trial if you don't have access to a paid production org.

  2. Visual Studio Code is a pluggable IDE. You can install the Salesforce DX extension pack to customize it for Salesforce development using the SFDX toolchain and methodology, but you can also use other (unofficial) Salesforce-related extensions that are available for VSC. For example, there's a MavensMate plugin for VSC just like there is for Atom and Sublime Text (although I believe the Sublime Text version is most stable). There are several other extensions for Salesforce development on Code that I don't have experience with.

  3. The traditional Force.com IDEs still work. That includes the old Force.com IDE in Eclipse, MavensMate (it's unsupported/unmaintained, but still functional), or any one of the commercial offerings like the Welkin Suite and Illuminated Cloud.

I use the traditional Eclipse-based Force.com IDE at work, and on personal and side projects variously use MavensMate, VS Code with Salesforce DX, and VS Code with the Force.com CLI. All of them work and all have limitations in one respect or another.

3
  • is it possible to use DX with a developer org?
    – tjcinnamon
    May 31, 2018 at 20:31
  • Presently, you can't get scratch orgs through a dev org, although they've intimated that's coming in Winter '19. You can sign up for a Dev Hub trial org, which has a 30 day lifespan, and you can easily replace it with a new one when it expires.
    – David Reed
    May 31, 2018 at 20:43
  • @tjcinnamon You can use DX with a developer org in the sense that you can authenticate with it, and mdapi:deploy/mdapi:retrieve against the org. You just can't use the new DX packaging features without a Dev Hub yet.
    – sfdcfox
    May 31, 2018 at 20:54
4

The ability to integrate the SFDX VS Code extension with traditional sandboxes and dev orgs was just announced (in Preview mode).

More info here

I've got this up and running now, but am still looking for a way to get auto-push to sandbox on save, like the current MavensMate workflow.

UPDATE: To log in to a sandbox, update the .sfdx/sfdx-project.json file with a new entry before using SFDX: Authorize an Org:

"sfdcLoginUrl": "https://test.salesforce.com"

I haven't tried that, rather used the command line method below.

To log into a sandbox, I had to run this on the command line in place of the 'Authorize an Org' command that was just taking me to the production login (which is no good for sandboxes): sfdx force:auth:web:login -r test.salesforce.com --setdefaultusername

2
  • Hi Welcome to SFSE! Can you please click edit and update your question with the information form the comment. Aug 27, 2018 at 20:39
  • This is great! I was hoping for this.
    – tjcinnamon
    Aug 27, 2018 at 21:07
2

No, that is not accurate. You seem to be slightly confused about SalesforceDX, and its interactions with VSCode (via the official plugins).

SalesforceDX is not a paid add-on like, say, a full-copy sandbox (or an additional one if you already have it). As long as you have a paid org, you have access to all of the features of SFDX.

What the VSCode plugins require are the Salesforce CLI to be installed on your local machine. The Salesforce CLI is free to download, install, and (partially) use for everyone (even developer edition orgs) as far as I know.

There are parts of the Salesforce CLI and the VSCode plugins that you won't be able to use without a dev hub org (dev hub can only be enabled in a dev hub trial org, or any paid org) like creating scratch orgs and pushing/pulling metadata to/from a scratch org, but the CLI and VSCode plugins can be used without that.

Probably the biggest drawback to using the CLI + VSCode plugins without having a dev hub org (and thus without the ability to create/manipulate scratch orgs) is that you lose the comparatively rich feedback that we had with the old force.com IDE or things like MavensMate.

Without scratch orgs, the flow is write code -> save -> CLI to convert to metadata form -> CLI to do a metadata deploy to your org of choice. The compilation error messages surfaced through that flow are not up to snuff in my opinion (at least at time of writing), and extra work is required to really get decent integration with VSCode.

You must log in to answer this question.

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