LWC Local Development Server auto refreshes page whenever any LWC component files change. Sometimes I change JS code but I'm not finished with it, I need to go back to console to refer the console logs/network requests but then I see the page got refreshed and I need to enter the test data all over again. I want to disable this behaviour and want to do the page refresh myself.

I checked the SFDX CLI Commands reference but, I guess, since Local Dev Server is in beta hence there is no mention of force:lightning:lwc:start command reference.

Appreciate if anyone could help with this. Thanks!

  • 3
    In that scenario, why not use push to a scratch org instead, or change IDE settings to only save files when you explicitly tell it? The local server mechanism is intended to automatically handle changes instantly, without the push round-trip so essentially it is either the wrong tool for you or you need to change how you use it.
    – Phil W
    Feb 6, 2021 at 9:08
  • 1
    @PhilW Thanks for your comment. This was actually helpful. Disable IDE's auto save feature. Now the component refreshes only when I explicitly save the files.
    – Jay Rathod
    May 29, 2021 at 13:07

1 Answer 1


In VS Code, terminal pane right top side open bash and kill terminal will stop local development server

  • *bash, to check if it is closed or not, you can restart your local server through terminal
    – vikash
    Oct 11, 2022 at 11:05
  • On Windows, CTRL+` will also open the Terminal directly
    – nbrown
    Oct 11, 2022 at 19:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .