基于React开发的新一代web调试工具,支持React组件调试,类似于Chrome Devtools。A Lightweight, Easy To Extend Web Debugging Tool Build With React

Overview

English | 简体中文

基于React开发的移动web调试工具 更新日志

简单易用

功能全面

易扩展

高性能

使用cdn方式,一键接入 类Chrome devtools, 内嵌React开发者工具,支持日志,网络,元素,代理,存储,性能等, 具有更好的网络捕获能力和丰富的日志展现形式 暴露内部丰富的事件, 可以和react组件无缝进行集成 支持大数据量展示, 不卡顿
NPM Version PRs Node Version

一、快速体验

https://tnfe.github.io/mdebug

image

二、Examples

  • Vanilla

Edit crimson-sun-py8x7

三、安装

Install using npm

npm install mdebug --save

四、使用

1. ES6

  import mdebug from 'mdebug';
  mdebug.init();

2.CDN

(function() {
    var scp = document.createElement('script');
    // 加载最新的mdebug版本
    scp.src = 'https://unpkg.com/mdebug@latest/dist/index.js';
    scp.async = true;
    scp.charset = 'utf-8';
    // 加载成功并初始化
    scp.onload = function() {
        mdebug.init();
    };
    // 加载状态切换回调
    scp.onreadystate = function() {};
    // 加载失败回调 
    scp.onerror = function() {};
    document.getElementsByTagName('head')[0].appendChild(scp);
})();

五、API

1. init

mdebug.init({
    containerId: '' // mdebug挂载容器id, 如果传空, 内部会自动生成一个不重复的id,
    plugins: [], // 传入mdebug插件
    hideToolbar: [], // 传入需要隐藏的tab id
});

2. addPlugin

mdebug.addPlugin({
    id: '', // tab id
    name: '', // tab对应的中文title,
    enName: '', // tab对应的英文title
    component: () => {}, // tab对应的react组件
});

3. removePlugin

// 支持移除的panel对应的id
/*
System => system;
Elements => elements;
Console => console
Application => application
NetWork => network
Performance => performance
Settings => settings
*/
mdebug.removePlugin([]);

4. exportLog

/*
@returned {
  type: '' // 日志类型
  source: [], // 原始日志
}
@params type
// type等于log, 返回所有的console日志
// type等于net, 返回所有的net日志
*/
mdebug.exportLog(type);

5. on

mdebug.on(eventName, callback);

6. emit

mdebug.emit(eventName, data);

六、事件列表

事件名称 数据 触发时机
ready object mdebug加载完毕
addTab object 增加面板
removeTab array 移除面板
changeTab object 面板切换

七、开发

  1. npm i
  2. npm start // 启动开发
  3. npm run build //打包
  4. npm run test // 单元测试

八、相关文章

  1. 移动端前端开发调试
  2. Chrome 开发者工具

九、相关项目

  1. eruda
  2. vConsole
  3. react-json-tree
  4. 基于React的移动端调试解决方案
  5. a useful debugger for mobile
  6. autoDevTools
  7. react-inspector
  8. web-console
  9. ChromeDevTools

十、License

The MIT License (MIT). Please see License File for more information.

You might also like...

The universal DevTools for LIFF (WebView) browser

The universal DevTools for LIFF (WebView) browser

LIFF Inspector 🔬 The universal DevTools for LIFF (WebView) browser LIFF Inspector is the official DevTools for LIFF(LNE Frontend Framework) that is i

Dec 19, 2022

Export Cypress Tests from Google Chrome DevTools' Recorder

@cypress/chrome-recorder This repo provides tools to export Cypress Tests from Google Chrome DevTools' Recordings Installation $ npm install -g @cypre

Dec 20, 2022

Generate WebdriverIO Tests from Google Chrome DevTools Recordings.

WebdriverIO Chrome Recorder This repo provide tools to convert JSON user flows from Google Chrome DevTools Recorder to WebdriverIO test scripts progra

Sep 28, 2022

Lightweight and versatile build tool based on the esbuild compiler

Lightweight and versatile build tool based on the esbuild compiler

Estrella is a lightweight and versatile build tool based on the fantastic esbuild TypeScript and JavaScript compiler. Rebuild automatically when sourc

Jan 2, 2023

Quickly create console debugging information for multiple languages.

Quickly create console debugging information for multiple languages.

Debugger for Console Quickly create console debugging information for multiple languages. This plugin uses antfu/starter-vscode as the initial templat

Oct 21, 2022

A docker container with a wide variety of tools for debugging and setting up micro-services

Frame One Software Placeholder There are numerous times during the dev ops deployments, that a placeholder container is needed. In the past, Frame One

May 29, 2022

Typescript & Debugging for Bitburner

Typescript & Debugging for Bitburner

Bitburner Scripts + Typescript + Local Server A Typescript template project with debugging support, import rewrites and developer convenience. How to

Nov 28, 2022

Quo is a (free) debugging companion app to help you debug dumped variables, the dumped variables will appear in this Quo client instead of the traditional way which is often tedious.

Quo is a (free) debugging companion app to help you debug dumped variables, the dumped variables will appear in this Quo client instead of the traditional way which is often tedious.

Quo is a debugging companion to help you debug dumped variables, the dumped variables will appear in this Quo client instead of via the traditional way which is often tedious.

Dec 25, 2022

🛠️ A simple GUI of Ethereum tools and utilities for debugging

Ethereum DevTools GUI A simple GUI of Ethereum tools and utilities for debugging Demo https://lab.miguelmota.com/ethereum-devtools Tools ABI viewer sh

Oct 31, 2022
Comments
  • consoler panel is not displaying right

    consoler panel is not displaying right

    1. executing any console method is not working well in console panel;
    2. after console.clear method executed, the console panel is not working well;

    as below: image

    opened by cdll 0
Releases(1.0.0)
Owner
腾讯TNTWeb前端团队
腾讯新闻中台前端团队
腾讯TNTWeb前端团队
API and CLI tool to fetch and query Chome DevTools heap snapshots.

Puppeteer Heap Snapshot Capture heap snapshots and query the snapshot for objects matching a set of properties. Read more about it in this blog post.

Adrian Cooney 858 Jan 3, 2023
📦 Alpine JS plugin to extend the functionality of the official $persist plugin

Alpine JS Persist Extended Alpine JS magic method $storage extends the official $persist plugin to help you work with local storage ?? Example ?? <div

Mark Mead 11 Dec 28, 2022
Avatar classes to extend Bootstrap 5.

Bootstrap Avatar A collection of fixed and responsive CSS for styling avatars. Demo https://ghoststead.github.io/bootstrap-avatar Installation jsDeliv

null 4 May 22, 2022
Minimalistic configuration for TS to only extend JS with types. No TS features, no bundling. Readable maintainable code after compilation.

ts-guideline Minimalistic configuration for TS to only extend JS with types. No TS-scpecific features, no bundling. Readable maintainable code after c

Georg Oldenburger 41 Dec 22, 2022
React-query devtools for swr

React-query devtools for swr

Erfan Khadivar 12 Aug 14, 2022
GraphErr is an open-source error handling library for GraphQL implementations in Deno. It's a lightweight solution that provides developers with descriptive error messages, reducing ambiguity and improving debugging.

GraphErr Descriptive GraphQL error handling for Deno/Oak servers. Features Provides additional context to GraphQL's native error messaging for faster

OSLabs Beta 35 Nov 1, 2022
A Knative debugging tool.

__ _____.__ _____/ |__/ ____\ | ______ / ___\ __\ __\| | \____ \

Jeff 9 Oct 28, 2022
Svelte debugging tool for re-rendering components

resvelte README This is the README for your extension "resvelte". After writing up a brief description, we recommend including the following sections.

OSLabs Beta 44 Oct 4, 2022
MerLoc is a live AWS Lambda function development and debugging tool. MerLoc allows you to run AWS Lambda functions on your local while they are still part of a flow in the AWS cloud remote.

MerLoc MerLoc is a live AWS Lambda function development and debugging tool. MerLoc allows you to run AWS Lambda functions on your local while they are

Thundra 165 Dec 21, 2022
Intuitive and dynamic Chrome Dev Tool Extension for Three.js debugging

sceneSniff An intuitive and dynamic Chrome Dev Tool Extension for Three.js debugging sceneSniff is an in browser developer tool for Three.js projects.

OSLabs Beta 59 Dec 8, 2022