前言
Vconsole是一个H5不错的调试工具
官网: https://www.npmjs.com/package/vconsole
示例:
使用
页面添加Vconsole
<script src="path/to/vconsole.min.js"></script>
<script>
// init vConsole
var vConsole = new VConsole();
console.log('Hello world');
</script>
示例:
http://wechatfe.github.io/vconsole/demo.html
测试环境添加
nginx 插入
sub_filter '</body>' '<script type="text/javascript" crossorigin="anonymous" src="path/to/vconsole.min.js"></script><script>new VConsole()</script></body>';
sub_filter_types text/html;
sub_filter_once off;