fix(Log): recognize adjacent format specifiers without spaces (issue #732) The detection regex required a space before or after each specifier, so patterns like %c%s were silently skipped and styles never applied. Relax the pattern to match any %c/%s/%d/%o regardless of surrounding whitespace; the inner per-token checks already handle optional spaces.
fix(Log): recognize adjacent format specifiers without spaces (issue #732)
The detection regex required a space before or after each specifier, so patterns like %c%s were silently skipped and styles never applied. Relax the pattern to match any %c/%s/%d/%o regardless of surrounding whitespace; the inner per-token checks already handle optional spaces.
%c%s
%c/%s/%d/%o
English | 简体中文
一个轻量、可拓展、针对手机网页的前端开发者调试面板。
vConsole 是框架无关的,可以在 Vue、React 或其他任何框架中使用。
现在 vConsole 是微信小程序的官方调试工具。
console.log|info|error|...
XMLHttpRequest
Fetch
sendBeacon
Cookies
LocalStorage
SessionStorage
详情可参考下方的截图。
最新版本:
每个版本的详细说明请参阅 Changelog。
详细使用方法请参阅使用教程。
将 vConsole 添加到项目中主要有以下方式:
$ npm install vconsole
Import 并初始化后,即可使用 console.log 功能,如 Chrome devtools 上一样。
console.log
import VConsole from 'vconsole'; const vConsole = new VConsole(); // 或者使用配置参数来初始化,详情见文档 const vConsole = new VConsole({ theme: 'dark' }); // 接下来即可照常使用 `console` 等方法 console.log('Hello world'); // 结束调试后,可移除掉 vConsole.destroy();
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script> <script> // VConsole 默认会挂载到 `window.VConsole` 上 var vConsole = new window.VConsole(); </script>
可用的 CDN:
http://wechatfe.github.io/vconsole/demo.html
console.log('output to Log panel.') console.log('[system]', 'output to System panel.')
vConsole 本体:
自定义插件:
QQ 群:497430533
The MIT License
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
English | 简体中文
vConsole
一个轻量、可拓展、针对手机网页的前端开发者调试面板。
vConsole 是框架无关的,可以在 Vue、React 或其他任何框架中使用。
现在 vConsole 是微信小程序的官方调试工具。
功能特性
console.log|info|error|...XMLHttpRequest,Fetch,sendBeaconCookies,LocalStorage,SessionStorage详情可参考下方的截图。
版本说明
最新版本:
每个版本的详细说明请参阅 Changelog。
上手
详细使用方法请参阅使用教程。
将 vConsole 添加到项目中主要有以下方式:
方法一:使用 npm(推荐)
Import 并初始化后,即可使用
console.log功能,如 Chrome devtools 上一样。方法二:使用 CDN 直接插入到 HTML
可用的 CDN:
手机预览
http://wechatfe.github.io/vconsole/demo.html
截图
概览
浅色主题
深色主题
Log 面板
Log 样式
命令行
System 面板
Performance 信息
输入日志到不同的 log 面板
Network 面板
请求、回包的详情
Element 面板
查看 HTML 对象结构
Storage 面板
添加、编辑、删除、复制 Cookies / LocalStorage / SessionStorage
文档
vConsole 本体:
自定义插件:
第三方插件列表
交流反馈
QQ 群:497430533
License
The MIT License