question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VueJS devtools not loading

See original GitHub issue

Hey, I tried to install the vuejs devtool but I ran into some issues. The install step goes well and I have the confirmation message appearing in my console, but when I open the developer tools I can’t find the vue devtools.

I tried with the given VUEJS_DEVTOOLS and by inserting the id of the chrome extension directly. I also tried putting the code before and after the window creation.

When I try to install other tools, like REDUX_DEVTOOLS it works, the tab is visible in the developer tools.

I have Windows 10 20H2, with dark mode disabled and Electron 11.1.1.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
blakewatsoncommented, Jan 1, 2021

For anyone who comes across this problem, here is the workaround that worked for me.

It seems the problem is that extensions don’t load properly if the page that you are requesting is a file:// URL (https://github.com/electron/electron/issues/24011). What we can do is see if we are running in development and, if we are, load our main index file using win.loadURL rather than win.loadFile.

I’m doing this on app ready:

const isDevEnvironment = process.env.NODE_ENV === "development";

if (isDevEnvironment) {
  // Open the DevTools.
  installExtension(VUEJS_DEVTOOLS)
    .then((name) => {
      console.log(`Added Extension:  ${name}`);
      win.webContents.openDevTools("bottom");
    })
    .catch((err) => console.log("An error occurred: ", err));

  win.loadURL('http://localhost:8080');
  return win;
}

In order to serve my page at http://localhost:8080 I’m using PHP’s built-in development server:

php -S localhost:8080

You could use whatever method you want. Note that if I’m not in a development environment, then I’m loading the index file the usual way with win.loadFile.

1reaction
Lothindircommented, Mar 30, 2021

Finally got it working. I had to add the repository as a package as mentioned here. I then added { loadExtensionOptions : { allowFileAccess : true}} as the second argument of the installExtension() function. As I’m using VUEJS_DEVTOOLS I had to remove some directories and keys from the extension (_metadata and some keys in manifest.json). It works with electron v12.0.2 (electron@latest).

Still waiting for the official release @MarshallOfSound 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

VueJs dev tools panel not showing - Stack Overflow
Enter chrome://extensions in the address bar and click on Details for Vue.js devtools. Scroll down to "Allow in Incognito" and switch to On....
Read more >
Vue.js is detected but the Vue Panel is not showing #1209
Go to the DevTools settings · Under Apperance, choose a different theme · The Vue Panel should be back now in DevTools ·...
Read more >
Vue3 devtools : VueJS not detected - Get Help - Vue Forum
I installed vue devtools but it says VueJS not detected (in chrome). my app is working fine. how can a Vue instance not...
Read more >
Vue.js devtools
Developer Tools. 1,000,000+ users. Overview. Browser DevTools extension for debugging Vue.js applications. Chrome devtools extension for ...
Read more >
Vue.js DevTools Tutorial - Flavio Copes
As mentioned, the Vue DevTools can be activated by opening the Developer Tools in the browser and moving to the Vue panel. Another...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found