Best VSCode Extensions for Salesforce

Salesforce Jedi
5 min readJul 11, 2023

Every Salesforce developer these days spends a lot of time in VSCode. Since the release of sfdx, this IDE has become the industry favorite. There are many other IDEs, but VSCode is the most widespread because it is free and has a lot of extensions to customize it.

1 Salesforce Extensions Pack

It is an essential extension for programmers who want to work with Salesforce in VSCode. It is an extension developed by Salesforce itself.

It is not a single extension, it is a collection of extensions that will allow us to turn VSCode into a suite of tools to work with Salesforce.

  • Salesforce CLI Integration: The most important extension is the CLI that allows us to communicate with Salesforce. To bring us metadata, deploy metadata, run anonymous Apex executions, run SOQL queries…
  • Apex: To facilitate Apex code programming with features such as Apex-specific code highlighting or code completion.
  • Apex Interactive Debugger: If we work with Scratch Orgs, this extension allows us to debug our Apex code as we would with any language running on our computer.
  • Apex Replay Debugger: It completes the functionality of the previous extension. It allows us to go step by step in our code through the logs generated by the execution.
  • Lightning Web Components: Support for the development of Lightning components with the Salesforce Lightning Web Component framework. It helps us to generate the HTML and JS of our components.
  • Aura Components: Support for the development of Aura components with the Salesforce Lightning Web Component framework. It helps us with the Aura specific markup language and the JS of our components.
  • Visualforce: Helps us work with Visualforce pages; with code highlighting, code completion or schematic visualization of the page structure.
  • SOQL: It allows us to launch queries, directly with the SOQL language or with an interactive form. We can export the data of our queries to .csv or .json files.
  • SLDS Validator: Salesforce Lightning Design System (SLDS) is the Salesforce style framework. This extension simplifies our work when applying styles to our components.

We could close the list with this extension, installing it in VSCode you will have all the basics to work with Salesforce.

2 XML

As you may know, much of the Salesforce metadata is in XML format. This extension has everything we need to work with those XML files.

This extension, among other things, helps us in the following when working with XML files:

  • Code highlighting.
  • Syntax validation.
  • Code completion.
  • Automatic indentation.

3 Prettier — Code formatter

Another extension that helps us to have all our code well organized and structured. By properly configuring this extension we will be able to automatically format our code, saving us a lot of time.

Prettier works for different programming and markup languages. For us working with Salesforce it will help us with the following:

  • Javascript
  • JSON
  • CSS
  • HTML
  • YAML

This extension also allows us to force certain formatting in our code. This way we won’t have different formats depending on who in the team developed it.

4 Apex PMD

This extension analyzes our Apex code to identify syntax errors. Although it not only analyzes syntax errors, it is also capable of proposing changes to optimize our code.

We can configure this extension to our liking, such as Prettier, it would be useful to force certain good practices in the code of our org. This way we ensure that all the code has a minimum of quality.

5 ESLint

In the same way that the previous extension analyzes our Apex code, this extension analyzes our Javascript code. Every Javascript programmer should know the ESLint library, and it is in the implementation for VSCode.

We can configure this extension to our liking, such as Prettier and Apex PMD, it would serve us to force certain good practices in the code of our org. Thus we not only ensure the quality of our Apex code but also of the Javascript code of our components.

6 Apex Log Analyzer

This extension allows us to analyze the logs generated by Salesforce executions to get the most out of them.

We can print those logs via Flamegraph or Calltree to analyze the performance of each of the points of our code.

7 Salesforce Package.xml Generator

This extension provides a graphical interface to generate the Package.xml file of our project in VSCode.

We simply indicate what type of components we want to include in our Package.xml and the extension will generate the file. We can filter by component types or by specific components.

Do you use any extensions that are not listed here?

--

--

Salesforce Jedi

+7 years in Salesforce landscape, now as architect and tech lead. Take a look to our GitHub repo: https://github.com/sfdcjedi