Skip to main content

Time to Migrate from Salesforce IDE to VS Code

Image Credit: Visualstudio marketplace


In case you don’t know Salesforce is phasing out IDE (planned for June 2018) to promote newer IDE choices. There are already many IDEs out there to take Eclipse based IDE’s place. However, Salesforce is officially promoting Microsoft Visual Studio Code (aka VS Code) as official IDE.

What is VS Code?

VS Code is a platform-independent, light-weight and keyboard focused IDE for Salesforce (sorry for folks who loved menus and GUI). VS Code does have visual menus and options, however, using keyboard shortcuts is just do damn fast. There is surely some learning curve involved. But, once you get rolling, you would hate using mouse, as it takes a lot of work to raise your hand, move mouse, point and click and navigate, when you can just press “Ctrl + /” to comment current code selection.

VS Code features

  • Lightweight – In case  you have worked a lot with Eclipse, you might have noticed that it was a memory hogging tool. To much relief, VS Code is a comparatively very lightweight
  • Fast – I remember there were times in large projects, where we waited for minutes to allow Eclipse to load properly. Thankfully, with VS Code you would have minimum such encounters (if any). Primarily, due to it’s lightweight model and lazy loading of extensions, it ensure it’s just loading the things, that your project needs. Others, will be loaded on demand
  • Inbuild GIT capabilities – This was one of the most profound experience I’ve had in using GIT in a development IDE (others may have had better experiences). But, the sheer ease of using GIT within VS Code is ecstatic. Whether it’s about identifying current branch, items to pull from remote, items to push to remote server, files changed. It’s so ingeniously baked within user interface that you would wonder why it wasn’t done in other IDEs.
  • Intellisense - VS Code packs amazing intellisense capabilities, so you don't need to remember all variables or classes it displays a list of available values for you to choose
  • Shortcuts, Shortcuts and Shortcuts – VS Code is heavy on shortcuts and allow users to configure custom shortcuts to increase personalization.
  • Addons/ Plugins – like Eclipse, VS Code has a vibrant community of developers publishing plugins / add-ons to add more features to VS Code. There are plugins for almost all usual needs and specific needs as well
  • Platform Independent – VS Code supports Windows/ Mac/ Linux. This can be very helpful in particular when you have team members using different mix of machines
  • Language Agnostic – This is beauty. Doesn’t matter if you work on Lightning components, Apex, Visualforce, NodeJS, PHP, C# (obviously) or any other programming language/ technology, it is most probable supported (natively or extensions). So, no switching between different IDEs, when you are you have a backend NodeJS server running on heroku
  • Fast Coding and Refactoring capabilities – being the new kid on the block, VS code gets advantage of adopting time proven best practices, tips and tricks to ease day to day life of developers and help them become more productive. Common things like searching a particular text in all files, or paragraphs within in all files, or replacing variable name in entire class, it can be done like a breeze.

Myth vs Reality

  • It’s only for SFDX based projects – Well that’s a big misconception, something a lot of people have asked about. VS Code can be used for both SFDX and non SFDX based projects. It really boils down to the extensions you would choose.
  • It’s too complicated (no GUI) – it certainly has a learning curve for folks who have used GUI heavy IDEs. They can start by using available GUI / menu options. Also, as you'll find below, there are extensions which provide rich menu based development features (check Forcecode)
  • It’s too Dark – Unless you are afraid of darkness, dark theme helps in saving energy and your eyes. You can still choose to switch to one of many available themes

How to get started?

It’s simple. Follow these steps:
  1. Download and install VS Code
  2. Install plugins (you’ll need some plugins for Salesforce development)
  3. Get Started

Extensions (plugins) Recommendations

  • SFDX extensions - natively provided by Salesforce and officially supported. These tools are and should be foundational platform for all Salesforce extensions.
  • Forcecode - one of the most prominent development extensions on VS Code (at least prior to SFDX). I prefer it for conventional development, as it provides true IDE features like menu based retrieve, deploy, execute script, update on save etc. 
  • GitLens - parsing old git logs and commits can be tiring sometimes. GitLens solves this by providing intuitive features like inline commit view, last version comparison etc.
  • To-do Tree - if you utilize best practices of inserting to-do in code, for later reference, this extension can ease up the process of finding all todos 
  • Apex PMD - Static code analysis for your Apex and Visualforce code


  1. Nice one 👍 you can also try package.xml generator vs code extension. This provides ide like UI to choose metadata for package.xml file


Post a Comment

Popular posts from this blog

Quick Tips: Salesforce default Images

Well, I'm sure a lot of you still rely on using out of the box salesforce images for displaying quick icons within formula fields or even using them within your Visualforce pages. Lately, I realized that a lot of earlier resources are no longer accessible, so I tried to quickly extract all images from Salesforce CSS files and provide a quick reference here. Please note, I've referenced all images from SF servers directly, so if anything changes, the image should stop rendering here. As these images are completely controlled by Salesforce, and in case they change anything, it might lead to image not being accessible. Image path Image /img/samples/flag_green.gif /img/samples/flag_green.gif /img/samples/flag_red.gif /img/samples/color_red.gif /img/samples/color_yellow.gif /img/samples/color_green.gif /img/samples/light_green.gif /img/samples/light_yellow.gif /img/samples/light_red.gif /img/samples/stars_100.gif /img/samples/stars_200.gif /img/samples/stars_300.

Lightning: Generate PDF from Lightning components with in-memory data

I'm sure as everyone is diving into lightning components development, they are getting acquainted with the nuances of the Lightning components framework. As well as, its current limitations. Being a new framework, this is bound to happen. Although we have our users still using salesforce classic, we have started using lightning components framework our primary development platform and Visualforce is considered primarily for rendering lightning components within Classic Service console. Recently, while re-architecting a critical module, we encountered a problem wherein we needed to generate PDF from lightning components. Now, being Javascript intensive framework, it has limited room for such features (may be included in future roadmap). As of now, there is no native feature within the lightning framework to do so (at least I didn't find anything). Common Scenario - Create Visualforce page to retrieve data and generate PDF For scenarios where the data exist within Sa

Quick Tips: Setup SFDX Manually without Admin access

We all have faced challenges while working in different enterprise environments, where there may be lot of controls/ checks/ red-tape to get by. In such situations, getting access to simple tools (even git) can take lot of time. Note: This tutorial is to be followed at your own risk, as it may not be complaint to your organization's IT policies. What is SFDX? SFDX is a command line utility for managing salesforce builds/ deployments. Being command line, it can be easily embedded to automation chains, to help build fully automated build and deployment processes. To get started, refer Setup SFDX on Windows machine without admin access As you may have already realized, SFDX installation needs admin access to one's machine. Which may be a luxury a lot of developers may not have. So, i tried to provide a step-by-step guide to setup SFDX on your computer without any admin access Steps: Note: