To enable Vue DevTools in a production application that disables the DevTools integration, you can run the following code in your browser console.
window.__VUE_DEVTOOLS_GLOBAL_HOOK__.enabled = true
// Gather all Vue apps on the page.
const apps = Array.from(document.querySelectorAll('[data-v-app]'), (element) => {
return element.__vue_app__
})
// Register each Vue app with the DevTools extension.
for (const app of apps) {
window.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit('app:init', app, app.version, {})
}Alternatively, you can create a bookmarklet to make it even easier to force-enable Vue DevTools in any production application. Create a new bookmark in your browser of choice with the following properties.
Name:
Enable Vue DevTools
URL:
javascript:(()=>{window.__VUE_DEVTOOLS_GLOBAL_HOOK__.enabled=!0;const apps=Array.from(document.querySelectorAll("[data-v-app]"),p=>p.__vue_app__);for(const app of apps)window.__VUE_DEVTOOLS_GLOBAL_HOOK__.emit("app:init",app,app.version,{});})();