vue-devtools

⚙️ Browser devtools extension for debugging Vue.js applications.

  • 所有者: vuejs/devtools-v6
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

vue-devtools

Installation

Important Usage Notes

  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.

  3. The events tab only show custom events emitted by a component. More information on custom events can be found in the documentation.

Open component in editor

To enable this feature, follow this guide.

Manual Installation

This is only necessary when you want to build the extension yourself from source to get not-yet-released features.

Make sure you are using Node 6+ and NPM 3+

  1. Clone this repo
  2. cd vue-devtools the newly created folder
  3. run yarn install
  4. then run yarn run build
  5. Open the Chrome extension page (currently under Menu > More Tools > Extensions)
  6. Check "developer mode" on the top-right corner
  7. Click the "load unpacked" button on the left, and choose the folder: vue-devtools/packages/shell-chrome/
  8. Alternatilvely to step 3, you can also use yarn dev:chrome to build & watch the unpacked extension

Development

  1. Clone this repo
  2. run yarn install
  3. then run yarn run dev
  4. A plain shell with a test app will be available at localhost:8100.

Testing as Firefox addon

  1. Install web-ext

    $ yarn global add web-ext
    

    Also, make sure PATH is set up. Something like this in ~/.bash_profile:

    $ PATH=$PATH:$(yarn global bin)
    
  2. Build and run in Firefox

    $ yarn run build
    $ yarn run run:firefox
    

Force enable the devtools

// Before you create app
Vue.config.devtools = process.env.NODE_ENV === 'development'

// After you create app
window.__VUE_DEVTOOLS_GLOBAL_HOOK__.Vue = app.constructor

// then had to add in ./store.js as well.
Vue.config.devtools = process.env.NODE_ENV === 'development'

Common problems and how to fix

  1. Fixing "Download the Vue Devtools for a better development experience" console message when working locally over file:// protocol:
    1.1 - Google Chrome: Right click on vue-devtools icon and click "Manage Extensions" then search for vue-devtools on the extensions list. Check the "Allow access to file URLs" box.

  2. How to use the devtools in IE/Edge/Safari or any other browser? Get the standalone Electron app (works with any environment!)

License

MIT

主要指標

概覽
名稱與所有者vuejs/devtools-v6
主編程語言TypeScript
編程語言JavaScript (語言數: 7)
平台
許可證MIT License
所有者活动
創建於2014-09-29 03:52:07
推送於2024-09-11 14:49:24
最后一次提交
發布數90
最新版本名稱v6.6.4 (發布於 2024-09-09 20:47:26)
第一版名稱v3.0.0 (發布於 )
用户参与
星數24.8k
關注者數507
派生數4.1k
提交數2.2k
已啟用問題?
問題數1614
打開的問題數475
拉請求數285
打開的拉請求數35
關閉的拉請求數129
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?