Install Local Development Server Plugin

Whether you’re debugging your component for iOS or Android, you must first install the LWC Development Server for mobile.
  1. In a terminal window in VS Code or Terminal, run the following command to ensure you’re using the latest version of Salesforce CLI.
    sf update

    If you encounter an error when updating Salesforce CLI, see Update Salesforce CLI for troubleshooting instructions.

    Note

  2. In the same terminal window, run the following command to install the LWC Development Server for mobile.
    sf plugins install @salesforce/lwc-dev-server