How to setup visual studio code editor with Salesforce

To Setup Visual Studio (VS) Code: based on machine operating system install VS Code editor on your machine.

Click on this link to download.

After installing it, add Salesforce CLI plugin in VS code

Install the Command Line Interface (CLI)

You can use Salesforce CLI to control the full application life cycle of your Salesforce apps. Through the CLI, you can easily create or connect to environments for development and testing, and synchronize metadata and code between your orgs and a version control system.

  1. Download the CLI using the appropriate link below.
Operating System
Link to Installer
Windows 32-bit
Windows 64-bit
Debian/Ubuntu 64
Download the archive from one of the URLs in the manifest, extract the archive, then run the ./install script.
Debian/Ubuntu x86
Download the archive from one of the URLs in the manifest, extract the archive, then run the ./install script.
  • Install the CLI through the installer.
  • Make sure the CLI is properly installed. Open the terminal app in macOS or the Command Prompt in Windows, and enter sfdx.

You should see something like this: 

Usage: sfdx COMMAND
Help topics, type sfdx help TOPIC for more details:
force    tools for the Salesforce developer
help     display help for <%= config.bin %>
plugins  add/remove/create CLI plug-ins
update   update the sfdx CLI


Give your terminal app a moment to return this result. It can take several seconds.

Install the Salesforce Extension Pack

Now that we have Salesforce CLI installed, we can supercharge Visual Studio Code by installing the Salesforce Extension Pack. The extension pack installs the essential Salesforce extensions all at once, saving you from selecting each one individually. 

The extensions provide deep integrations with Salesforce tooling throughout VS Code. You can invoke Salesforce CLI from a variety of places (VS Code menus, shortcut keys, and right-click context menus). 

New functionality shows up as you’re working, including:

  • Language Services for Apex
  • Language Services for Visualforce
  • Language Services for Lightning Components (Aura and Lightning Web Components)
  • Integrations in the activity bar for Apex tests and Replay Debugger.
  1. Launch Visual Studio Code.
  2. On the left toolbar, click the Extensions icon .
  1. Enter Salesforce Extension Pack in the search field.
Visual Studio Code search result for Salesforce extension pack.
  1. Click into the card that says Salesforce Extension Pack.
  2. Then in the newly launched window, click the green Install button.
  3. Close and relaunch Visual Studio Code to complete the installation.

Popular Posts

Leave a Reply

Your email address will not be published. Required fields are marked *