8

For very specific reasons, I have set the vue dev tools to true in production.

Vue.config.devtools = true

Am using the following versions:

"vue": "^2.5.2"
"vuex": "^3.0.1"
"vuetify": "^1.0.0"

While I can see the components and events, the Vuex store is not detected.

I have tried downgrading the vuex version to 2.3.1 and 2.4.x, but it did not help. Here's the link I referred to - https://github.com/vuejs/vue-devtools/issues/405

Note - The store works well, its just that I am not able to view it in the Vue dev tools.

Any pointers is appreciated.

Marcel
  • 15,039
  • 20
  • 92
  • 150
nizantz
  • 1,561
  • 1
  • 13
  • 17
  • 1
    You should set `NODE_ENV` to the `development` as well. Use this answer if u don't know how to: https://stackoverflow.com/questions/25112510/how-to-set-environment-variables-from-within-package-json-node-js – GONG Jun 21 '18 at 19:26

6 Answers6

26

you have to set Vue.config.devtools = true before you create the store.

here my store.js:

import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
Vue.config.devtools = true

export const store = new Vuex.Store({
  state: {
    counter: 0
  }
})
Us3rAIpha8rav0
  • 354
  • 5
  • 12
  • If you import your store, you need it there as well https://github.com/vuejs/devtools/issues/405#issuecomment-379314711 – iamface Oct 11 '21 at 20:40
2

Also make sure to turn on recording mode in devtools (the red round button).

It was turned off and that actually was the mistake. :-D

Valentin Seehausen
  • 665
  • 1
  • 8
  • 10
1

I had the exact same problem with Vue 3. Updating the vuex from 4.0.0 to 4.0.2 did resolve the problem.

anchan42
  • 55
  • 4
0

If Vuex store values is showing undefined it is probably because the values were not set through mutations

Mithsew
  • 1,129
  • 8
  • 20
  • 2
    Mithsew, this does not provide an answer to the question. Once you have sufficient [reputation](/help/whats-reputation) you will be able to [comment on any post](/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](//meta.stackexchange.com/q/214173). – Luca Kiebel Jan 28 '22 at 21:57
0

What fixed this issue for me was to place the devtools import just before Vue on my main.js file:

import devtools from '@vue/devtools';
import Vue from 'vue';
// ...

The docs mention this: https://devtools.vuejs.org/guide/installation.html#using-dependency-package

Make sure you import devtools before Vue, otherwise it might not work as expected.

sito
  • 1
0

I had similar problem, no Vuex will show in my vue devtools. What helped me was:

  • in menu (3 dots on the right)select devtools plugins
  • from the list that show up choose your vue (in my case "Vue 2")
  • uncheck and check again 'enabled'
  • close devtools
  • refresh your page
Mona
  • 61
  • 2
  • It would be at least beneficial to share some information on which browser you are using so people can determine whether this short guide you shared is valuable to them. – Ogier Schelvis May 12 '22 at 11:31