Per configurare visual studio code al tuo progetto Salesforce, segui questi passi:

  1. Create a project (ctrl + p -> create a project)
  2. Autorize a org (ctrl + p -> autorize a org)
  3. sfdx force:org:list
  4. sfdx force:org:open -u [alias]
  5. create the package.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>  
<Package xmlns="http://soap.sforce.com/2006/04/metadata">  
    <types>  
        <members>*</members>  
        <name>ApexClass</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>ApexComponent</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>ApexPage</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>ApexTestSuite</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>ApexTrigger</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>AuraDefinitionBundle</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>StaticResource</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomApplication</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>ApprovalProcess</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>AssignmentRule</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>AuthProvider</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CallCenter</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Community</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>ConnectedApp</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomApplicationComponent</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomMetadata</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomPermission</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Dashboard</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>DataCategoryGroup</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Document</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>EmailTemplate</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>EntitlementProcess</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>EntitlementTemplate</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>FlexiPage</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Flow</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Group</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>HomePageComponent</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>HomePageLayout</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomLabels</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Layout</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>MilestoneType</name>  
    </types>  
    <types>           
        <members>*</members>  
        <name>CustomObject</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Letterhead</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomObjectTranslation</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>PermissionSet</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>PostTemplate</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Profile</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Queue</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>QuickAction</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>RemoteSiteSetting</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>ReportType</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Workflow</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Report</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>SiteDotCom</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomSite</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Scontrol</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Settings</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomTab</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Translations</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>CustomPageWebLink</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>Role</name>  
    </types>  
    <types>  
        <members>*</members>  
        <name>SamlSsoConfig</name>  
    </types>  
    <version>44.0</version>  
</Package> 

Esempio di package.xml

sfdx force:mdapi:retrieve -r metadata -u [user] – k package.xml