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

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:

主站蜘蛛池模板: 临澧县| 齐齐哈尔市| 蒲江县| 平和县| 濉溪县| 迭部县| 枝江市| 苏尼特右旗| 荃湾区| 郁南县| 洪泽县| 宜良县| 福清市| 承德县| 罗田县| 景谷| 南阳市| 新竹县| 上饶市| 黄平县| 林口县| 潮安县| 合作市| 尤溪县| 定陶县| 全州县| 宾川县| 武威市| 大城县| 英超| 连城县| 商水县| 江川县| 昌邑市| 吉水县| 赤壁市| 浙江省| 吉安县| 哈尔滨市| 木兰县| 茌平县|