Workspace Setup

Set up your development environment, create a project to develop your LWC in, and connect your project to Salesforce.
  1. Launch VS Code.
  2. Select File | Open and open a project to use with your org.

    If you don’t have a project created, you can open the VS Code Command Palette by clicking View | Command Palette, enter SFDX, and select SFDX: Create a Project. Then follow the prompts.

    Note

  3. In the menu bar, select View | Terminal to open VS Code’s integrated terminal if it’s not already visible.
  4. Run the following command to install the Salesforce Extension Plugins for mobile.
    sf plugins install @salesforce/lwc-dev-mobile
  5. In the menu bar, select View | Command Palette to open the VS Code Command Palette.
  6. Enter SFDX and select SFDX: Authorize an Org.
  7. Select the org you want to use and press Enter.
    A web page opens for the org login.
  8. Verify your org authorization by checking the bottom left in VS Code.
    You should see your username in the VS Code status bar.
    VS Code status bar showing org authentication status

    If you have difficulty authorizing SFDX for access to your org, see SFDX Authorization.