Skip to content

Top 7 VSCode (Visual Studio Code) Extensions for Salesforce Developers

List of Top 7 VSCode (Visual Studio Code) Extensions for Salesforce Developers.

1. Salesforce Extension Pack

Salesforce Extensions Pack VSCode Extensions for Salesforce

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, Aura components, and Visualforce.

VS Code Salesforce Extension Pack Overview
Salesforce Extension Pack (Image Courtesy: Visual Studio Marketplace)

The Salesforce Extension Pack extension installs these extensions.

  1. Salesforce CLI Integration – This extension (salesforcedx-vscode-core) interacts with Salesforce CLI to provide core functionality.
  2. Apex – This extension (salesforcedx-vscode-apex) uses the Apex Language Server to provide features such as syntax highlighting and code completion.
  3. Apex Interactive Debugger – This extension (salesforcedx-vscode-apex-debugger) enables VS Code to use the real-time Apex Debugger with your scratch orgs or to use ISV Customer Debugger for your subscribers’ orgs.
  4. Apex Replay Debugger – This extension (salesforcedx-vscode-apex-replay-debugger) enables VS Code to replay Apex execution from Apex debug logs.
  5. Lightning Web Components – This extension supports Lightning web component bundles. It uses the HTML language server from VS Code.
  6. Aura Components – This extension (salesforcedx-vscode-lightning) supports Aura component bundles. It uses the HTML language server from VS Code.
  7. Visualforce – This extension (salesforcedx-vscode-visualforce) supports Visualforce pages and components. It uses the Visualforce Language Server and the HTML language server from VS Code.
  8. SOQL – This extension (salesforcedx-vscode-soql) enables you to interactively build a SOQL query via a form-based visual editor, view the query as you build, and save the output to a .csv or .json file.
  9. Salesforce Lightning Design System (SLDS) Validator – This extension (salesforcedx-vscode-slds) simplifies working with the Salesforce Lightning Design System (SLDS). It provides code completion, syntax highlighting and validation with recommended tokens and utility classes.

2. Apex PMD

Apex PMD VSCode Extensions for Salesforce

Allows you to run Apex Static Analysis directly in vscode on Apex, VisualForce & other XML metadata files.

Apex PMD Overview
Apex PMD (Image Courtesy: Visual Studio Marketplace)

Current Supported Actions:

  • Run analysis on file open
  • Run analysis on file save
  • Run analysis on file change (new!)
  • Run analysis on entire workspace
  • Run analysis on single file
  • Ability to define your own ruleset

3. Prettier – Code formatter

Prettier Formatter for Visual Studio Code

Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.

4. ESLint

ESLint VSCode Extensions for Salesforce

Integrates ESLint into VS Code. ESLint can find and fix problems in your JavaScript code.

Find Problems

ESLint statically analyzes your code to quickly find problems. ESLint is built into most text editors and you can run ESLint as part of your continuous integration pipeline.

Fix Automatically

Many problems ESLint finds can be automatically fixed. ESLint fixes are syntax-aware so you won’t experience errors introduced by traditional find-and-replace algorithms.

5. GitLens

GitLens VSCode Extensions for Salesforce

GitLens supercharges Git inside VS Code and unlocks untapped knowledge within each repository. It helps you to visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more.

GitLens Revision Navigation
GitLens Revision Navigation (Image Courtesy: Visual Studio Marketplace)

6. Apex Log Analyser

An analyzer for Salesforce debug logs aimed at making performance analysis much easier and quicker. You may also find it generally useful for quickly understanding how your code is executing.

The main view provides a flame graph for visualising code execution:

Apex Log Analyzer Overview
Apex Log Analyser (Image Courtesy: Visual Studio Marketplace)

Hovering over an element provides information on the item. If you click on an item it will take you to the call navigatable stack view.

Other views are available to show a sorted list of the methods invoked and the SOQL operations performed.

7. Salesforce Package.xml Generator Extension for VS Code

Salesforce Package.xml Generator Extension for VSCode

This extension provides a User Interface to choose metadata components for Package.xml file for development against sandboxes or DE orgs (Org Development Model with VS Code). This is similar to Eclipse Force.com IDE Add/Remove Metadata Components option.

Salesforce Package XML Generator Overview
Salesforce Package.xml Generator Extension for VS Code (Image Courtesy: Visual Studio Marketplace)

Additional Resources

These are some the VSCode Extensions for Salesforce I use frequently. What other VSCode Extensions do you use? Please let us know in comments!


Recommended Articles

Share this article...

Please Leave a Comment

error: Content is protected !!

Discover more from DYDC

Subscribe now to keep reading and get access to the full archive.

Continue reading