Salesforce Visual Studio Code



A step-by-step guide with screenshots to get you started in less than 30 minutes

Salesforce Visual Studio CodeSalesforce vs code setup

Eclipse + Force.com IDE has been one of the popular options for doing development on Salesforce’s Force.com platform. A couple of years back I posted a step by step guide on how to install and configure Force.com IDE on Eclipse. However, with Spring 18 Release of Salesforce, Salesforce has discontinued any future releases of Force.com IDE tool. Mavensmate has been another popular open source Force.com IDE tool for many developers but even that has been discontinued.

That’s it, you’re done! You just developed, tested, and debugged Apex code using Apex Replay Debugger and Salesforce Extensions for Visual Studio Code. Click Verify Step to confirm the debug session with your hands-on org and to collect your badge. External Site: Apex Replay Debugger for Visual Studio Code. Use Visual Studio Code for Salesforce Development. Hello all, I am new on the salesforce developer platform at the last level of project (https. Visual Studio Code is the go-to code editor for Salesforce developers. It's free, open-source, and available for Windows, Linux, and macOS. This editor has easy-to-install extensions for syntax highlighting, code completion, and more. In this project, we install Visual Studio Code and the recommended Salesforce Extension Pack.

You can continue to use the Salesforce GUI or Developer Console for writing custom codes and that is okay for the lightweight development. But for heavy development work, you need a professional development tool that offers you advanced features like integration with source control, syntax highlighting, auto-completion, debugger, offline editing, etc. Visual Studio Code (or VS Code in short) is one of the most popular source code editors among developers. This is a tool developed by Microsoft and has all the features highlighted above. One of the great things about VS code is that it has its own marketplace where 3rd parties can develop extensions to use within VS Code. And this is exactly what Salesforce has done. Developed an extension for VS Code for developing applications on the Salesforce platform. And the cherry on the top is that all this is FREE

I am not a hardcore developer, but I do need to take a look at the code or do some light development from time to time. When I tried the VS Code for the first time, it felt good – lightweight, neat and clean (reminded me of the experience when I used the Google Chrome browser for the first time)

Earlier, Salesforce CLI & Salesforce Extensions for VS Code mainly supported development with Scratch Orgs. No Sandboxes and/or dev orgs. However, after Dreamforce 2018, these tools now seem to be having support for doing development against any kind of orgs – Sandbox, dev orgs or scratch orgs. (IMPORTANT:This is still in open beta as of this writing)

Vs Code Salesforce Extension

So here is all you need to get started with Visual Studio Code for Salesforce. A step-by-step guide with screenshots. And it won’t take more than 30 minutes for you to download, install, configure and start using it. Say goodbye to Eclipse + Force.com IDE or Mavensmate and say hello to VS Code. And with the Salesforce extension coming directly from Salesforce and not 3rd parties you can look forward to regular release of new features and functionalities in the extension.

Salesforce Visual Studio Code

Here is a high level description of the different tools that we used in this blog post.

  1. VS Code – Is a source code editor from Microsoft. Visual Studio Code combines the simplicity of a source code editor with powerful developer tooling, like IntelliSense code completion and debugging. First and foremost, it is an editor that gets out of your way. The delightfully frictionless edit-build-debug cycle means less time fiddling with your environment, and more time executing on your ideas. (Okay, if this sounded like a sales talk, I picked it up from here)
  2. Salesforce Extensions for VS Code – An extension pack developed by Salesforce for VS Code. This extension pack includes tools for developing on the Salesforce platform in the lightweight, extensible VS Code editor. These tools provide features for working with development orgs (scratch orgs, sandboxes, and DE orgs), Apex, Lightning components, and Visualforce.
  3. Salesforce CLI – Is a powerful command line interface that simplifies development and build automation when working with your Salesforce org. Use it to:
    • Synchronise source to and from scratch orgs
    • Create and manage orgs
    • Import and export data
    • Create and execute tests
    • Create and install packages
  4. Salesforce DX – Salesforce DX includes lots of tools and new functionality. For example: the Salesforce CLI, the Salesforce Extensions for VS Code, scratch orgs and unlocked packages could all be considered parts of Salesforce DX

Salesforce Visual Studio Code

Once you have install and configured Visual Studio Code for Salesforce, you may want to check out my other blog post “Salesforce Code Scanner – How to Bake Quality in Your Code with Apex PMD” and start using Apex PMD with VS Code to get instant feedback on your code (Apex & Visualforce) and make it better. This blog post won’t take more than 15 minutes for you configure Apex PMD in VS Code and start using it.

References:

    1. Getting Started in VS Code with Salesforce DX (YouTube Video – 17:44 Minutes)
    2. Be An Efficient Salesforce Developer with VS Code (YouTube Video – 43:04 Minutes)
    3. VS Code for Salesforce Developers: Your Questions Answered (Blog Post)
    4. VS Code Introductory Videos (Set of Videos to get started with VS Code)

Vs Code Sfdx

Related posts:

Salesforce Visual Studio Code Tutorial

Salesforce Visual Studio Code

Salesforce Visual Studio Code Trailhead

Hi Alpher,-You don't. Visual Studio Code using Salesforce Extensions is supposed to work with Scratch Orgs (via SalesforceDX), not Sandboxes.