Preview LWC locally
Use the local shell for LWC routes, page targets, named contexts, and record data. The local shell gives useful local preview routes. It does not replace hosted Lightning Experience.
Before you start
Install the local toolchain once. Run from the project root so Glade can find source, glade.lwc.json, schema, labels, static resources, and local data.
Steps
Install the LWC toolchain:
glade toolchain installOpen the Workbench Console:
glade dev lwc --project . --openUse a seeded local DB when record-page LWCs, LDS, Apex, or builder record search need persisted rows:
glade db seed --db .glade/envs/lwc-preview.sqlite --project . data/lwc-preview-db.json
glade dev lwc --project . --db .glade/envs/lwc-preview.sqlite --openOpen a named context:
glade dev lwc --project . --context accountRecord --openOpen an explicit record page target:
glade dev lwc --project . --target record-page --object Account --record 001000000000001AAA --page Account_Record_Page --openExpected output
Glade prints a local URL and opens the Workbench Console when --open is set. The console shows route discovery, a preview canvas, editable context, debug panes for Apex, LDS, network calls, navigation/events, and runtime issues, and local data service behavior. Builder record pages search objects and records from the active local DB, while app and home page contexts stay record-free. Builder mobile preview uses the main canvas viewport control instead of a permanent side-by-side phone panel.
Common wrong turn
Do not use the local shell as final proof for Lightning Experience chrome, hosted permission behavior, every base component edge, Flow Builder behavior, or live streaming. Salesforce remains the gate for hosted behavior.