Install the Mobile Preview extension from the Visual Studio Marketplace, start your dev server, then run “Mobile Preview: Show” from the Command Palette. Your site loads in an iPhone frame next to your code and reloads when you save. The free version includes three iPhone models.
What you get
Mobile Preview shows your page inside a device frame, in a panel next to your code. The frame uses the real viewport dimensions of the device and draws its Dynamic Island or notch and status bar, so you see the layout a phone user would get, without switching windows.
It works with React, Next.js, Vue, Vite, Angular, Svelte, Astro, Remix and Gatsby, or any page that loads in a browser. You can also preview a staging or production URL.
Step by step
- Install the extension from the Extensions view: search “Mobile Preview” and choose “Mobile Preview - Phone & Tablet Simulator”.
- Start your dev server (npm run dev, yarn start, and so on).
- Open the Command Palette with Ctrl+Shift+P (Cmd+Shift+P on Mac), type “Mobile Preview: Show” and press Enter.
- If the page does not load by itself, enter the address of your dev server in the address bar of the panel.
- Pick a device from the menu. Edit your code and save: the preview refreshes.
Free and Pro
The free version has no time limit and includes three iPhones (16, 17 and 17 Pro Max), automatic dev server detection, live reload and framed screenshot export. Pro adds more iPhones, Android phones, foldables, iPads and Android tablets, landscape mode on every device, device presets and more saved favorites. Pro is a one-time payment of €6.99, not a subscription.
Limits to know
Mobile Preview is not an emulator. It renders your page in a frame with the right dimensions, which is a fast way to check layout and responsive behavior. It does not replace a test on a physical iPhone, and it does not run iOS Safari: rendering differences between browsers can still exist.
Frequently asked questions
- Can I see my site on an iPhone in VS Code without an emulator?
- Yes. Mobile Preview shows your page in an iPhone frame with the real viewport size inside VS Code, with no emulator to install or boot. It is a layout preview, not an iOS emulator.
- Does it update when I save?
- Yes. The preview reloads automatically each time you save a file.
- Is it free?
- There is a free version with no time limit: three iPhone models, live reload, dev server detection and framed screenshots. Pro (€6.99, one time) unlocks 35+ devices including Android and iPad.
- Does it work with Next.js, Vite or Vue?
- Yes. It works with any page served on localhost or any URL that loads in a browser, including React, Next.js, Vue, Vite, Angular, Svelte, Astro, Remix and Gatsby.
Install Mobile Preview from the Visual Studio Marketplace · Open VSX (Cursor, Windsurf, VSCodium) · Pricing
More: all guides · device sizes · How to test responsive design in Cursor and Windsurf · Mobile Preview vs Chrome DevTools device mode: which should you use?