Installation
Previous version
If you want to install the previous version of the devtools (v5), see here.
Chrome
Install the extension on the Chrome Web Store:
Install on ChromeBeta
To install the beta version of the devtools, remove or disable any existing versions and install the extension from here.
Install Beta version on ChromeSettings
If you need to use the devtools in incognito mode or when you open an HTML file directly, you need to change the extension settings.
- Go to the extensions:
Click on the
Details
button on the Vue.js Devtools extension.Make sure the relevant settings are set:
Firefox
Install the extension on the Mozilla Addons website:
Install on FirefoxBeta
To install or update the beta version of the devtools, remove or disable any existing versions, go to one of repository beta releases and download the xpi
file.
Settings
If you need to use the devtools in incognito mode, you need to change the extension settings.
- Open Menu and click Add-ons and Themes
- Click on Manage Option on Vue.js devtools Extension Options
- Make sure the relevant settings are set:
Edge
Install the extension on the Edge Store:
Install on EdgeSettings
If you need to use the devtools in InPrivate mode or when you open an HTML file directly, you need to change the extension settings.
- Go to the extension page:
- Make sure the relevant settings are set:
Standalone
In case you are using an unsupported browser, or if you have other specific needs (for example your application is in Electron), you can use the standalone application.
Install the package globally:
npm install -g @vue/devtools
Or locally as project dependency:
npm install --save-dev @vue/devtools
Using global package
Once you installed the package globally, run:
vue-devtools
Then add this code to the <head>
section of your application HTML file:
<script src="http://localhost:8098"></script>
Or if you want to debug your device remotely:
<script>
window.__VUE_DEVTOOLS_HOST__ = '<your-local-ip>' // default: localhost
window.__VUE_DEVTOOLS_PORT__ = '<devtools-port>' // default: 8098
</script>
<script src="http://<your-local-ip>:8098"></script>
(Don't forget to remove it before deploying to production!)
<your-local-ip>
usually looks like this: 192.168.x.x
.
Then start your development server like you are used to, without killing the vue-devtools
command (for example, open a new terminal). Both need to run in parallel.
yarn dev
#or
yarn serve
Using dependency package
Once you installed the package as project dependency, run:
./node_modules/.bin/vue-devtools
You can also use the global vue-devtools
to start the app, but you might want to check if the local version matches the global one in this scenario to avoid any incompatibilities.
Then import it directly in your app:
import devtools from '@vue/devtools'
// import Vue from 'vue'
Make sure you import devtools before Vue, otherwise it might not work as expected.
And connect to host:
if (process.env.NODE_ENV === 'development') {
devtools.connect(/* host, port */)
}
host - is an optional argument that tells your application where devtools middleware server is running, if you debug your app on your computer you don't have to set this (the default is http://localhost
), but if you want to debug your app on mobile devices, you might want to pass your local IP (e.g. http://192.168.1.12
).
port - is an optional argument that tells your application on what port devtools middleware server is running. If you use proxy server, you might want to set it to null
so the port won't be added to connection URL.
Legacy
If something is broken with the new devtools, please submit a new issue!
Meanwhile, you can install the legacy version (v5) of the devtools:
Make sure you disable any other versions of the Vue devtools. Only one version should be enabled at a time.