I'm using the Local Development Server to test my LWC. How do I add data and custom setting records in order to test my components? Is it linked to an org somehow?

1 Answer 1


In VS Code, select the org you wish to use as the default (see the plug icon in the lower-left corner), then start the LWC server, and then use the Preview Locally option. At this point, the server will proxy any apex commands to the selected org, so you'll be able to read, create, update, and delete data from that org, as if the component was running in the org directly.

  • I know this is old and dead but do you also have to deploy to that org to test things out?
    – ensir
    Jul 18, 2022 at 17:51
  • @ensir Good question. I don't actually remember. I'll check it out later today and get back to you.
    – sfdcfox
    Jul 18, 2022 at 19:04

You must log in to answer this question.

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