List of Top 7 VSCode (Visual Studio Code) Extensions for Salesforce Developers.
1. Salesforce Extension Pack
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.
The Salesforce Extension Pack extension installs these extensions.
- Salesforce CLI Integration – This extension (
salesforcedx-vscode-core) interacts with Salesforce CLI to provide core functionality.
- Apex – This extension (
salesforcedx-vscode-apex) uses the Apex Language Server to provide features such as syntax highlighting and code completion.
- 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.
- Apex Replay Debugger – This extension (
salesforcedx-vscode-apex-replay-debugger) enables VS Code to replay Apex execution from Apex debug logs.
- Lightning Web Components – This extension supports Lightning web component bundles. It uses the HTML language server from VS Code.
- Aura Components – This extension (
salesforcedx-vscode-lightning) supports Aura component bundles. It uses the HTML language server from VS Code.
- 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.
- 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.
- 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
Allows you to run Apex Static Analysis directly in vscode on Apex, VisualForce & other XML metadata files.
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 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.
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.
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.
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.
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:
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
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.
These are some the VSCode Extensions for Salesforce I use frequently. What other VSCode Extensions do you use? Please let us know in comments!