A step-by-step guide with screenshots to get you started in less than 30 minutes
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.
Like with any good development tool, there is more than one way to do things with Visual Studio Code. The two main ways you can interact with Salesforce CLI are through the integrated terminal or quick open window. To view the quick open window, press Command + P on Mac or Ctrl + P on Windows. You can view the help menu. Through this module we will use the quick open window in command. Salesforce help; salesforce training; salesforce support. Hi Alpher,-You don't. Visual Studio Code using Salesforce Extensions is supposed to work with Scratch Orgs (via SalesforceDX), not Sandboxes. Browse other questions tagged visual-studio-code code-formatting or ask your own question. The Overflow Blog Podcast 332: Non-fungible Talking.
Visual Studio Code is the latest IDE for Salesforce Development and in this blog post, I am going to tell you how you can setup Visual Studio Code for Salesforce Development. So, let's begin. Download and Install VSCode.
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)
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.
Here is a high level description of the different tools that we used in this blog post.
- 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)
- 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.
- 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
- 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
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:
- Getting Started in VS Code with Salesforce DX (YouTube Video – 17:44 Minutes)
- Be An Efficient Salesforce Developer with VS Code (YouTube Video – 43:04 Minutes)
- VS Code for Salesforce Developers: Your Questions Answered (Blog Post)
- VS Code Introductory Videos (Set of Videos to get started with VS Code)
Vs Code Salesforce Extension
Visual Studio Code Salesforce Setup
Related posts: