Tencent /vConsole
A lightweight, extendable front-end developer tool for mobile web page.
★ 17,540⑂ 2,959👁 301⑃ 224● 507▤ 57
+0
日增长
17,540
stars
2,959
forks
301
watchers
224
prs
507
issues
57
releases
README
English | 简体中文
vConsole
===
一个轻量、可拓展、针对手机网页的前端开发者调试面板。
vConsole 是框架无关的,可以在 Vue、React 或其他任何框架中使用。
现在 vConsole 是微信小程序的官方调试工具。
---
功能特性
- 日志(Logs): console.log|info|error|...
- 网络(Network): XMLHttpRequest, Fetch, sendBeacon
- 节点(Element): HTML 节点树
- 存储(Storage): Cookies, LocalStorage, SessionStorage
- 手动执行 JS 命令行
- 自定义插件
详情可参考下方的截图。
---
版本说明
最新版本:
每个版本的详细说明请参阅 Changelog。
---
上手
详细使用方法请参阅使用教程。
将 vConsole 添加到项目中主要有以下方式:
方法一:使用 npm(推荐)
bash
$ npm install vconsole
Import 并初始化后,即可使用 console.log 功能,如 Chrome devtools 上一样。
javascript
import VConsole from 'vconsole';
const vConsole = new VConsole();
// 或者使用配置参数来初始化,详情见文档
const vConsole = new VConsole({ theme: 'dark' });
// 接下来即可照常使用 console 等方法
console.log('Hello world');
// 结束调试后,可移除掉
vConsole.destroy();
方法二:使用 CDN 直接插入到 HTML
html
// VConsole 默认会挂载到 window.VConsole 上
var vConsole = new window.VConsole();
可用的 CDN:
- https://unpkg.com/vconsole@latest/dist/vconsole.min.js
- https://cdn.jsdelivr.net/npm/vconsole@latest/dist/vconsole.min.js
---
手机预览
http://wechatfe.github.io/vconsole/demo.html
!
---
截图
概览
浅色主题
!
深色主题
!
Log 面板
Log 样式
!
命令行
!
System 面板
Performance 信息
!
输入日志到不同的 log 面板
javascript
console.log('output to Log panel.')
console.log('[system]', 'output to System panel.')
Network 面板
请求、回包的详情
!
Element 面板
查看 HTML 对象结构
!
Storage 面板
添加、编辑、删除、复制 Cookies / LocalStorage / SessionStorage
!
---
文档
vConsole 本体:
- 使用教程
- 公共属性及方法
- 内置插件:属性及方法
自定义插件:
- 插件:入门
- 插件:编写插件
- 插件:Event 事件列表
---
第三方插件列表
- vConsole-sources
- vconsole-webpack-plugin
- vconsole-stats-plugin
- vconsole-vue-devtools-plugin
- vconsole-outputlog-plugin
- vite-plugin-vconsole
---
交流反馈
QQ 群:497430533
!
---
License
The MIT LicenseTop issues
#582ios移动端页面显示空白10 comments · 2022-11-14#602苹果手机无法复制console.log里打印的信息8 comments · 2023-02-06#484Type error in IOS devices7 comments · 2021-12-14#592在Storage里使用编辑功能修改key值,保存会自动把key和value变为空5 comments · 2022-12-18#569安卓 5.1 支持5 comments · 2022-10-10#735处理流式数据的错误报警4 comments · 2026-04-20#606`Symbol.toStringTag` support is missing4 comments · 2023-02-27#580UI Bug: Log 和 System 的 command 和 filter 的 input 框不正常4 comments · 2022-11-09
Latest release
v3.15.1 v3.15.1 2023-06-01EN: - Feat(Netwrk) Add new option network.ignoreUrlRegExp to skip some requests. (PR 623) - Fix(Core) Fix prototype pollution in vConsole.setOption(). (issue 616 621) - Fix(Core) Fix plugin event ready triggering before its HTML finishes rendering. (issue 591) - Fix(Log) Reset group state when console.clear() is called. (issue 611) - Fix(Log) Compatible with iOS (less than 13.4) that does not support ResizeObserver, but there may be a potential performance issue when printing a large number of logs. (issue 610) - Fix(Network) Fix possible "Cannot read property" error by sendBeacon. (is