Reputation: 13920
Not detected my <script src="https://cdn.jsdelivr.net/npm/vue"></script>
Also https://v2.vuejs.org/v2/examples/commits.html have <script src="/js/vue.js"></script>
and when click Vue icon at Chorme say "Vue.js not detected"
PS: using extension described here and supposing the github.com/vuejs/vue-devtools.
EDIT: the installation say nothing, but you must to close and reopen Chorme.
Well, after it a new problem, now the on-click-VueIcon message is
Vue.js is detected on this page. Devtools inspection is not available because it's in production mode or explicitly disabled by the author.
Upvotes: 21
Views: 26442
Reputation: 1739
If using Vue 3, you need the new version of the extension that is currently still in beta https://chrome.google.com/webstore/detail/vuejs-devtools/ljjemllljcmogpfapbkkighbhhppjdbg?hl=en
Upvotes: 12
Reputation: 57
When using the answer to samayo for beginners is not complete. It is important for confused people to know the code that is placed in some location.
Vue.config.devtools = true;
code snippet in your xxx.js file. For example:
Vue.config.devtools = true;
new Vue({
el: '#app',
data: {
message: 'Hello Vue!',
}
})
Reference:
Upvotes: 3
Reputation: 3225
In order to make vue-devtools able to detect that you're running a Vue application, it is not enough to add the Vue library itself. Indeed, you have to create at least a Vue instance.
For example, the following is properly detected as Vue application.
<html>
<head>
<title>Hello there</title>
<script src="https://unpkg.com/[email protected]/dist/vue.js"></script>
</head>
<body>
<div id="app"></div>
<script type="text/javascript">
// creating a root Vue instance here
var vm = new Vue({el: '#app'});
</script>
</body>
</html>
Upvotes: 0
Reputation: 2855
Manage extensions
Allow access to file URLs
NOTE: You might need to turn on debug mode by adding this line at the beginning of your script
Vue.config.devtools = true;
Upvotes: 20
Reputation: 1730
you are seeing this error because you are using minified version of vue, which in addition to having a smaller size has some production ready settings including Vue.config.devtools = true
,
putting the non-minified version solve the problem
Upvotes: 0
Reputation: 1730
I think you're using the minified version of vue which by default has the Vue.config.devtools = false, IMHO you'd better use a non-nested cdn like https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.15/vue.js
Upvotes: 0
Reputation: 16495
According to your edit, the answer is to turn on debug mode for vue as:
import Vue from 'vue'
Vue.config.devtools = true
This will allow you to see/inspect using devtools. Just make to sure to turn it off during production
Upvotes: 2