官术网_书友最值得收藏!

Vue devtools

An official debugger tool for Vue is available on Chrome as an extension called Vue.js devtools. It can help you see how your app is running to help you debug your code. You can download it from the Chrome Web Store (https://chrome.google.com/webstore/search/vue) or from the Firefox addons registry (https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/?src=ss).

For the Chrome version, you need to set an additional setting. In the extension settings, enable Allow access to file URLs so that it can detect Vue on a web page opened from your local drive:

On your web page, open the Chrome Dev Tools with the F12 shortcut (or Shift + command + c on OS X) and search for the Vue tab (it may be hidden in the More tools... dropdown). Once it is opened, you can see a tree with our Vue instance named Root by convention. If you click on it, the sidebar displays the properties of the instance:

You can drag and drop the devtools tab to your liking. Don't hesitate to place it among the first tabs, as it will be hidden in the page where Vue is not in development mode or is not running at all.

You can change the name of your instance with the name option:

var app = new Vue({
name: 'MyApp',
// ...
})

This will help you see where your instance in the devtools is when you will have many more:

主站蜘蛛池模板: 西昌市| 华池县| 郑州市| 杂多县| 陆良县| 德清县| 无棣县| 凤冈县| 读书| 县级市| 耒阳市| 绥德县| 嘉荫县| 宁德市| 洪湖市| 子长县| 泸西县| 漾濞| 繁峙县| 交城县| 上栗县| 苍山县| 惠安县| 阜宁县| 隆化县| 大连市| 肥西县| 阜平县| 广汉市| 上犹县| 东辽县| 关岭| 威信县| 焦作市| 宣武区| 大足县| 桐乡市| 西贡区| 新丰县| 英吉沙县| 苍梧县|