Every once in a while we need to debug something in production. But with Vue.js deployed with devtools disabled, you'll see the message:
Now it's a PITA to debug if you can't reproduce the bug on your dev environment.
Vue.config.devtools = true
Most bundlers leave the comments from a source file for licensing purposes, so we can search all files for a specific comment:
* Vue.js v2.6.11 * (c) 2014-2019 Evan You * Released under the MIT License. */
Set a breakpoint on this line and reload the page. If it's all minified and in one line, you'll need to jump to the very end of it with the "step over next function call (F10 / CMD ')". If it's not minified you'll need to set a breakpoint after the whole Vue code block.
Now by looking through the variables in our scope we need to find the Vue object. With Webpack Vue should be inside exports, something like this:
In our case, we see that the property
exports of the object
t is our Vue object.
Our breakpoint can be removed and the runtime resumed - that's it! Just close the developer tools and open again to see our Vue tab available to us!
The solution may vary based on your setup, please comment if you have problems with it and I might add more info to the post.