uni-app visually created project mobile terminal installation and debugging plug-in vconsole

 For visually created projects, the vconsole plug-in cannot be found in the plug-in market.

It’s not good npm install vconsole

To change the idea, first create a cli scaffolding uni-app project, and then install vconsole on this project

cli scaffolding to create uni-app project and install plug-in

Project Terminal running command: npm install vconsole  

After the installation is complete, the plug-in is in node_modules/vconsole

After the installation is completed, copy the vconsole package on the card to the original project uni_module.

main.js plus introduction

// #ifdef H5
// 提交前需要注释  本地调试使用
const vconsole = require('@/uni_modules/vconsole/dist/vconsole.min')
Vue.prototype.$vconsole = new vconsole() // 使用vconsole
// #endif

 Run the project:

You can happily read the LOG, which is very similar to the debugging of the WeChat applet.

Guess you like

Origin blog.csdn.net/LlanyW/article/details/132698637