[Blog] How to set up Visual Studio Code?

Опубликовано: 29 Октябрь 2024
на канале: Jade
127
6

Introduction:

Visual Studio Code (an IDE), includes the following features:

Code Editor
Build automation tools
A debugger
Intelligent code completion
Install Visual Studio Code:

Users can install Visual Studio Code on any computer running macOS, Windows, or Linux. The system requirements are less so we can run on just about any machine.

Download and install the latest version of Visual Studio Code for operating system. If Visual Studio Code already installed, there is no need to reinstall it.
syntax_image
Launch Visual Studio Code.
syntax_image
Make Visual Studio Code Salesforce Ready:

This tool has a lot of features that make it a great development environment. Below are steps to install Salesforce CLI and Salesforce Extensions for VS Code. Learn more about Salesforce services

Install the Command Line Interface (CLI)
Salesforce CLI can be used to control the full application life cycle of Salesforce apps. Through the CLI, we can easily create or connect to environments for development and testing and synchronize metadata and code between orgs and a version control system.
Download the CLI using the appropriate link below.
Operating System Link to Installer
macOS https://sfdc.co/sfdx_cli_osx
Windows 32-bit https://sfdc.co/sfdx_cli_win
Windows 64-bit https://sfdc.co/sfdx_cli_win64
Debian/Ubuntu 64 https://sfdc.co/sfdx_cli_linux
Debian/Ubuntu x86 https://sfdc.co/sfdx_cli_linux_x86
Install the CLI through the installer.
Once CLI is properly installed, follow the below steps:
Open the terminal app in macOS or the Command Prompt in Windows
Enter sfdx
Install the Salesforce Extension Pack
Extension pack consists of all the essential Salesforce extensions and can install all at once, saving users from selecting each one individually. The extensions provide integrations with Salesforce tooling throughout VS Code. Users can invoke Salesforce CLI from a variety of places (VS Code menus, shortcut keys, and right-click context menus).
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.
Launch Visual Studio Code.
On the left toolbar, click the Extensions icon Visual Studio Code's Extension icon.
syntax_image
Enter Salesforce Extension Pack in the search field. VS Code search result for Salesforce extension pack.
Click into the card that says Salesforce Extension Pack.
syntax_image
Then in the newly launched window, click the green Install button.
Close and relaunch Visual Studio Code to complete the installation.
Authenticate to Salesforce Org:

Press Command + Shift + P on Mac or Ctrl + Shift + P on Windows to make the command palette appear.
syntax_image
Type SFDX: Authorize an Org.
To accept the default login URL, press Enter.
syntax_image
Enter the alias VSCodePlayground.
Notice that your default browser opens a new Salesforce login window. Log in to your playground using your playground username and password retrieved from the last step.
When you are asked to grant access to the connected app, click to allow.

Learn more: https://www.jadeglobal.com/blog/how-s...


Follow us on:
linkedIn:   / jade-global  
Twitter:   / jadeglobal  
Facebook:   / jadeglobal