EugeneDae / vscode-refresh-browser

(VS Code extension) Refresh your web-browser with ⌘R without switching from Code. Only works on macOS.
https://marketplace.visualstudio.com/items?itemName=dae.vscode-refresh-browser
MIT License
7 stars 2 forks source link
vscode vscode-extension

Refresh Browser (VS Code extension)

Icon

Refresh your web-browser with a ⌘R shortcut without switching from VS Code. Only works on macOS!

🔥 NEW FEATURE IN VERSION 1.1.0: enable refreshBrowser.runBuildTask setting if you want to run the build task of your project before refreshing the browser.

FAQ

Installation

Click Install on the Marketplace, or run from the command palette (Cmd-Shift-P):

ext install dae.vscode-refresh-browser

Usage

Press Cmd-R or run Refresh Browser from the command palette (Cmd-Shift-P).

Command ID: extension.refreshBrowser

Settings

{
    "refreshBrowser.browser": "Google Chrome", // the browser to refresh
    "refreshBrowser.urlPrefixes": [] // refresh the tab whose URL starts with one of the specified prefixes
    "refreshBrowser.runBuildTask": false // if enabled, run the build task and wait for its completion before refreshing the browser (if the build task is not available, simply refresh the browser)
}

A note regarding refreshBrowser.urlPrefixes: if you add https://localhost, a tab whose URL is https://localhost/website/index.html will be refreshed. If there are multiple tabs with matching URLs, only the first one will be refreshed. If there are no tabs with a matching URL, the active tab will be refreshed.

Feedback

If you have a problem or a suggestion, please open an issue on GitHub.

License

MIT License © Eugene ‘Dae’ Zuyev (dae@dae.me).