百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
V

vscode-browser-preview

> 编程语言
开源

在编辑器中提供真实的浏览器预览,您可以对其进行调试。

4.4K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

在编辑器中提供真实的浏览器预览,您可以对其进行调试。

## :rotating_light: Deprecation Notice This extension has been deprecated in favor of the [Live Preview extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.live-server). The Live Preview extension is under active development and has much of the same functionality, including an embedded preview and external browser debugging. You can install the Live Preview extension and safely uninstall or disable this Browser Preview extension. Please file any issues you encounter in the [Live Preview repository](https://github.com/microsoft/vscode-livepreview).



Browser Preview for VS Code

A real browser preview inside your editor that you can debug.

Browser Preview for VS Code enables you to open a real browser preview inside your editor that you can debug. Browser Preview is powered by [headless Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome), and works by starting a headless Chromium instance in a new process. This can either be Google Chrome or Microsoft Edge. This enables a secure way to render web content inside VS Code, and enables interesting features such as in-editor debugging and more! ## Getting started 1. Grab extension from [marketplace](https://marketplace.visualstudio.com/items?itemName=auchenberg.vscode-browser-preview) 2. Click the new "Browser Preview" button in the Side Bar to the left or run the command `Browser View: Open Preview` Make sure you have Google Chrome installed on your computer. ## Features - Browser preview inside VS Code (Powered by [headless Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome)). - Ability to have multiple previews open at the same time. - Debuggable. Launch urls and attach [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) to the browser view instance, and debug within VS Code. - Attach Chrome DevTools via `chrome://inspect` - Option to set the default startUrl via `browser-preview.startUrl` - Option to set the path to the chrome executable via `browser-preview.chromeExecutable` - Option to set the type of rendering via `browser-preview.format` with the support for `jpeg` (default one) and `png` formats ## How to change the default start url / start page? Go to your settings, search for "browser preview" and set `browser-preview.startUrl` to your desired url. ## Launch and Debugging You can enable in-editor debugging of Browser Preview by installing [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome), and configure VS Code's debugger to either attach or launch to the browser previews by using the following configuration: ```json { "version": "0.1.0", "configurations": [ { "type": "browser-preview", "request": "attach", "name": "Browser Preview: Attach" }, { "type": "browser-preview", "request": "launch", "name": "Browser Preview: Launch", "url": "http://localhost:3000" } ] } ``` The debug configuration also supports these additional properties: `webRoot`, `pathMapping`, `trace`, `sourceMapPathOverrides` and `urlFilter`. See for details on how to use. ### Watch It [Watch an animated gif](docs/DEBUGGING.md) showing how to open the preview and debug a browser app. ## Additional configuration Browser Preview has the following settings: ```json "browser-preview.startUrl": // The default start url for new Browser Preview instances "browser-preview.verbose": false // Enable verbose logging of messages sent between VS Code and Chrome instance "browser-preview.chromeExecutable": // The full path to the executable, including the complete filename of the executable "browser-preview.format": // Option to set the type of rendering with the support for `jpeg` (default one) and `png` formats "browser-preview.ignoreHttpsErrors": false // Ignore HTTPS errors if you are using self-signed SSL certificates ```

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •Browser preview inside VS Code (Powered by headless Chromium).
  • •Ability to have multiple previews open at the same time.
  • •Debuggable. Launch urls and attach Debugger for Chrome to the browser view instance, and debug within VS Code.
  • •Attach Chrome DevTools via chrome://inspect
  • •Option to set the default startUrl via browser-preview.startUrl
  • •Option to set the path to the chrome executable via browser-preview.chromeExecutable
  • •Option to set the type of rendering via browser-preview.format with the support for jpeg (default one) and png formats

> 标签

TypeScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言