Local Dev runs a real-time preview of the Lightning app on your local machine. Local Dev detects source code changes and automatically refreshes Lightning apps, speeding up development time.
STEP 1:
To enable this feature in your Salesforce org, navigate to Setup > Local Development, and toggle Local Development to Enabled as shown in the screenshot.

STEP 2:
Install the plugin in Visual Studio Code or any other IDE by running the following command in the terminal:sf plugins install @salesforce/plugin-lightning-dev
STEP 3:
Finally, open the CLI and run the following command. It will prompt you to select a few additional attributes, and once completed, it will launch the app in Local Development mode with a banner displayed at the top of the page.sf lightning dev app
