Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Browser in VS CodeNew to Visual Studio Code? Get it now.
Browser in VS Code

Browser in VS Code

gyu

|
3 installs
| (0) | Free
A browser for webview development inside VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Browser in VS Code for webview development

English | 한국어

Overview

This extension lets you open and debug URLs (e.g., localhost) inside a VS Code Webview. It is a minimal example extension.

  • Command: Browser in VS Code: Open Webview — opens a webview with a simple address bar and an iframe.

Note: Many websites block iframe embedding via security policies (CSP / X-Frame-Options). Some URLs may not load inside the webview.

If you want to view console logs from the embedded page, include the script below in your index.html:

<script src="https://unpkg.com/iframe-console-relay/dist/index.umd.min.js"></script>

For npm usage and details, see: https://github.com/g2developer/iframe-console-relay

Caution: Include the above script only during development/debugging. It poses security risks.

Demo

Demo: Browser in VS Code This video is a demo of editing a page using Browser in VSCode and an AI agent. Environment: React, Vite, Codex (AI Agent). (The segments showing the AI agent working have been removed for time constraints.)

Development

  1. Install dependencies: npm install
  2. Build: npm run compile or npm run watch
  3. Package VSIX: npm run build (or npm run build:install to also install)
  4. Press F5 to launch the Extension Host, then run the command from the Command Palette.

Development conveniences:

  • Editing files under media/* automatically reloads the webview.
  • Saving under src (which updates out/*) automatically reloads the VS Code window (restarts the extension host) so changes apply without reinstalling.

Build/Install scripts

  • npm run build: compile TypeScript and create a VSIX
  • npm run build:install: create a VSIX and install to VS Code (--force to reinstall), or manually install the built browser-in-vscode.vsix

💰 Support & Donation

🍪 Buy the Developer a Little Treat If you find this project helpful, consider buying the developer a snack — even a small treat keeps the energy (and code) flowing!

  • Donate via PayPal
  • Donate via Buy Me a Coffee
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft