In order to connect VSCode to Salesforce orgs, you need to install:
- SFDX CLI (https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm)
Also please make sure you can run 'sfdx' command from any folder in the command prompt (cmd) and not only from the folder where
sfdx cli
is installed
Also please make sure you can run 'sfdx' command from any folder in the command prompt (cmd) and not only from the folder where sfdx cli
is installed
- Salesforce Extension Pack (Open VSCode -> Extensions -> Search for Salesforce Extension Pack)
Salesforce Extension Pack (Open VSCode -> Extensions -> Search for Salesforce Extension Pack)
When you have SFDX Cli and Salesforce Extension Pack installed you need to create a project folder for your org. You can either run the following command in terminal/command prompt
sfdx force:project:create --projectname "name of your's project folder" --manifest
or in VSCode open "Command Pallete" and type SFDX: Create Project
and follow the wizard.
After you have a project folder in SFDX format you will be able to connect it to the Salesforce org. To do so you have a few options:
- Authorize a new org through the cli and set it as default for the current project (you need to run that command from the project folder)
sfdx force:auth:web -a "alias-for-the-org" --setdefaultusername
- Set previously authorized org as the default org for the current project
sfdx force:config:set defaultusername=alias-for-another-org
- Open "Org Launcher" in the VSCode and select previously authorized org / authorize a new one