mirror of
https://github.com/liriliri/eruda.git
synced 2026-05-20 08:47:20 +08:00
04c51025edb3c348dba9407aaa3fd76661404a05
Eruda
Console for Mobile Browsers.
Why
Logging things out on mobile browser is never an easy stuff. I used to include window onerror alert script inside pages to find out JavaScript errors, kind of stupid and inefficient. Desktop browser DevTools is great, and I wish there is a similar one on mobile side, which leads to the creation of Eruda.
Features
- Console: Display JavaScript logs.
- Network: Show performance timing.
- Elements: Check dom state.
- Snippets: Include snippets you used most often.
- Resource: Show localStorage, cookie information.
Install
You can get it on npm.
npm install eruda --save
Add this script to your page.
(function () {
var src = 'node_modules/eruda/dist/eruda.min.js';
if (!/eruda=true/.test(window.location) && localStorage.getItem('active-eruda') != 'true') return;
document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
})();
The JavaScript file size is quite huge and therefore not suitable to include in mobile pages. We add this script to make sure eruda is loaded only when eruda is set to true on url(http://example.com/?eruda=true).
License
Eruda is released under the MIT license. Please see LICENSE for full details.
Description
Console for mobile browsers.
一个开源的前端页面调试神器专为手机前端页面设计的调试面板,类似 DevTools 的迷你版,主要功能包括:捕获 console 日志、检查元素状态、捕获 XHR 请求、显示本地存储和 Cookie 信息等等。
https://eruda.liriliri.io/
Readme
MIT
5.4 MiB
Languages
JavaScript
83.5%
SCSS
10.2%
HTML
4.1%
CSS
2.2%
