1 Star 0 Fork 10

wyunfei / vConsole

forked from Gitee 极速下载 / vConsole 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

English | 简体中文

vConsole

一个轻量、可拓展、针对手机网页的前端开发者调试面板。

vConsole 是框架无关的,可以在 Vue、React 或其他任何框架中使用。

现在 vConsole 是微信小程序的官方调试工具。


功能特性

  • 日志(Logs): console.log|info|error|...
  • 网络(Network): XMLHttpRequest, Fetch, sendBeacon
  • 节点(Element): HTML 节点树
  • 存储(Storage): Cookies, LocalStorage, SessionStorage
  • 手动执行 JS 命令行
  • 自定义插件

详情可参考下方的截图。


版本说明

最新版本: npm version

每个版本的详细说明请参阅 Changelog


上手

详细使用方法请参阅使用教程

将 vConsole 添加到项目中主要有以下方式:

方法一:使用 npm(推荐)

$ npm install vconsole

Import 并初始化后,即可使用 console.log 功能,如 Chrome devtools 上一样。

import VConsole from 'vconsole';

const vConsole = new VConsole();
// 或者使用配置参数来初始化,详情见文档
const vConsole = new VConsole({ theme: 'dark' });

// 接下来即可照常使用 `console` 等方法
console.log('Hello world');

// 结束调试后,可移除掉
vConsole.destroy();

方法二:使用 CDN 直接插入到 HTML

<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


截图

概览

浅色主题

深色主题

Log 面板

Log 样式

命令行

System 面板

Performance 信息

输入日志到不同的 log 面板
console.log('output to Log panel.')
console.log('[system]', 'output to System panel.')

Network 面板

请求、回包的详情

Element 面板

查看 HTML 对象结构

Storage 面板

添加、编辑、删除、复制 Cookies / LocalStorage / SessionStorage


文档

vConsole 本体:

自定义插件:


第三方插件列表


交流反馈

QQ 群:497430533


License

The MIT License

English | [简体中文](./README_CN.md) vConsole === A lightweight, extendable front-end developer tool for mobile web page. vConsole is framework-free, you can use it in Vue or React or any other framework application. Now vConsole is the official debugging tool for WeChat Miniprograms. --- ## Features - Logs: `console.log|info|error|...` - Network: `XMLHttpRequest`, `Fetch`, `sendBeacon` - Element: HTML elements tree - Storage: `Cookies`, `LocalStorage`, `SessionStorage` - Execute JS command manually - Custom plugins For details, please see the screenshots below. --- ## Release Notes Latest version: [![npm version](https://img.shields.io/npm/v/vconsole/latest.svg)](https://www.npmjs.com/package/vconsole) Detailed release notes for each version are available on [Changelog](./CHANGELOG.md). --- ## Guide See [Tutorial](./doc/tutorial.md) for more usage details. For installation, there are 2 primary ways of adding vConsole to a project: #### Method 1: Using npm (Recommended) ```bash $ npm install vconsole ``` ```javascript import VConsole from 'vconsole'; const vConsole = new VConsole(); // or init with options const vConsole = new VConsole({ theme: 'dark' }); // call `console` methods as usual console.log('Hello world'); // remove it when you finish debugging vConsole.destroy(); ``` #### Method 2: Using CDN in HTML: ```html <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script> <script> // VConsole will be exported to `window.VConsole` by default. var vConsole = new window.VConsole(); </script> ``` Available CDN: - https://unpkg.com/vconsole@latest/dist/vconsole.min.js - https://cdn.jsdelivr.net/npm/vconsole@latest/dist/vconsole.min.js --- ## Preview [http://wechatfe.github.io/vconsole/demo.html](http://wechatfe.github.io/vconsole/demo.html) ![](./doc/screenshot/qrcode.png) --- ## Screenshots ### Overview <details> <summary>Light theme</summary> ![](./doc/screenshot/overview_light.jpg) </details> <details> <summary>Dark theme</summary> ![](./doc/screenshot/overview_dark.jpg) </details> ### Log Panel <details> <summary>Log styling</summary> ![](./doc/screenshot/plugin_log_types.jpg) </details> <details> <summary>Command line</summary> ![](./doc/screenshot/plugin_log_command.jpg) </details> ### System Panel <details> <summary>Performance info</summary> ![](./doc/screenshot/plugin_system.jpg) </details> <details> <summary>Output logs to different panel</summary> ```javascript console.log('output to Log panel.') console.log('[system]', 'output to System panel.') ``` </details> ### Network Panel <details> <summary>Request details</summary> ![](./doc/screenshot/plugin_network.jpg) </details> ### Element Panel <details> <summary>Realtime HTML elements structure</summary> ![](./doc/screenshot/plugin_element.jpg) </details> ### Storage Panel <details> <summary>Add, edit, delete or copy Cookies / LocalStorage / SessionStorage</summary> ![](./doc/screenshot/plugin_storage.jpg) </details> --- ## Documentation vConsole: - [Tutorial](./doc/tutorial.md) - [Public Properties & Methods](./doc/public_properties_methods.md) - [Builtin Plugin: Properties & Methods](./doc/plugin_properties_methods.md) Custom Plugin: - [Plugin: Getting Started](./doc/plugin_getting_started.md) - [Plugin: Building a Plugin](./doc/plugin_building_a_plugin.md) - [Plugin: Event List](./doc/plugin_event_list.md) --- ## Third-party Plugins - [vConsole-sources](https://github.com/WechatFE/vConsole-sources) - [vconsole-webpack-plugin](https://github.com/diamont1001/vconsole-webpack-plugin) - [vconsole-stats-plugin](https://github.com/smackgg/vConsole-Stats) - [vconsole-vue-devtools-plugin](https://github.com/Zippowxk/vue-vconsole-devtools) - [vconsole-outputlog-plugin](https://github.com/sunlanda/vconsole-outputlog-plugin) - [vite-plugin-vconsole](https://github.com/vadxq/vite-plugin-vconsole) --- ## Feedback QQ Group: 497430533 ![](./doc/screenshot/qq_group.png) --- ## License [The MIT License](./LICENSE)

简介

vConsole,手机前端开发调试利器 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/wyunfei/vConsole.git
git@gitee.com:wyunfei/vConsole.git
wyunfei
vConsole
vConsole
dev

搜索帮助