关于安装了Vue-devtools插件但在浏览器控制台不显示的解决方案

Google浏览器中开发调试的时候,右上角出现vue的图标,但是在开发者工具中没有出现vue调试(已在扩展程序中安装 Vue Devtools)

控制台却没有。

错误原因:

没显示调试工具的原因是用了生产环境的版本或是压缩的vue版本,或是没有勾选

https://github.com/vuejs/vue-devtools
 
1. If the page uses a production/minified build of Vue.js, devtools inspection is disabled by default so the Vue pane won't show up.
2. To make it work for pages opened via file:// protocol, you need to check "Allow access to file URLs" for this extension in Chrome's extension management panel.

解决方法:

官方建议在项目入口文件(main.js)引入:

Vue.config.devtools = true;

  

原文地址:https://www.cnblogs.com/yuanchao-blog/p/10932531.html