Skip to content

Instantly share code, notes, and snippets.

@davidmyersdev
Last active October 31, 2025 21:14
Show Gist options
  • Save davidmyersdev/64c5bcf99566cc78b45c63e2604d5c56 to your computer and use it in GitHub Desktop.
Save davidmyersdev/64c5bcf99566cc78b45c63e2604d5c56 to your computer and use it in GitHub Desktop.
How to force Vue DevTools to load in a production app

Manually

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, {})
}

With a bookmarklet

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,{});})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment