Press enter to see results or esc to cancel.

Setting up Visual Studio Code IDE for Salesforce Development

In this blog post we will setup Visual Studio Code IDE to work with Salesforce Development. Salesforce suggest to use VSCode as the preferable IDE for the Salesforce development and Release management in case if you are using sfdx approach in your Organization.

Step by Step guide to install Visual Studio Code:
  • Visit the Official Visual Studio website to download the executable file.

Download VSCode

 

  • Once you have successfully followed the instruction and installed the VSCode you will see something like below on opening the VSCode with release notes file.

visual-studio-code-successful-installation

In order to work with sfdx process, you have to install Salesforce CLI If you haven’t already. Make sure install properly and verify the setup correctly. Once you have done everything properly. You will see the output when you execute the command in VSCode terminal.
Tip: To open the Terminal either you can go to Terminal and select New Terminal or You can click on the caution symbol a the bottom left corner, It will open the command prompt.

VSCode-salesforce-cli

Install Salesforce Extension Pack:

Now that we are properly installed the Salesforce CLI and verified, Now its time to install Salesforce Extension Pack which is the Catalyst for Salesforce development.

  • Go to Visual studio code and from the left side select extension icon.
  • Type Salesforce Extension Pack
  • Select the Salesforce Extension Pack
  • Install the extension.
You can visit Visual Studio Marketplace for the same.
Salesforce-Extension-pack
As I have already installed the Salesforce Extension Pack you are seeing those other option. Note that again if you visit the Extension pack you will see lots of other related extension also installed. As part of the pack those extensions will be installed.
  1. Salesforce CLI Integration
  2. Apex
  3. Apex Interactive Debugger
  4. Apex Replay Debugger
  5. Lightning Web Components
  6. Aura Components
  7. Visualforce
Some of the Other Extension I am using with Salesforce Extension Pack are as below.
These are few I am using, there are lots of extensions available, Based on the requirements we can install them.
Now that we have installed all the required extension, It’s time to connect to the org and start developing.
Close all the tabs in the Visual Studio Code.
On the screen you can see to explore all the commands click Ctrl+Shift+P
Command-Palette
  • Select SFDX: Create Salesforce Project with manifest
  • Select Standard
  • Enter Project Name as VSCodeSetup
  • Select the folder location of your choice.
  • In the background Salesforce CLI will run the command to create the project with Manifest file.
  • Now VSCode will open in another window with VSCodeSetup folder.

VSCodeSetup

Now its time to authenticate with Salesforce Org.
  • click Ctrl+Shift+P
  • Enter SFDX: Authorize an Org and select the same.
  • Select Project Default
  • Give an alias as VSCodeSetup
  • Now it will open the browser enter your Salesforce Org Credentials.
  • On successful authentication you will see output in the VSCode in the output section of the terminal.
In the back ground below command was running to create the Project.
sfdx force:auth:web:login –setalias VSCodeSetup –instanceurl https://login.salesforce.com –setdefaultusername
 

org-authentication

In this blog post we have seen the Visual Studio Setup, installing the Salesforce Extension Pack, some of the useful Extensions apart from Salesforce Extension Pack and creating Salesforce Package. Thanks for Reading the blog post, In the coming blog posts we will see working with metadata, data, deployment process many more… Please drop a comment in case if you have any questions/suggestions.