Need help with eruda?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

liriliri
10.0K Stars 807 Forks MIT License 775 Commits 28 Opened issues

Description

Console for mobile browsers

Services available

!
?

Need anything else?

Contributors list

中文

Eruda

NPM version Build status Test coverage Downloads License Join the chat at https://gitter.im/liriliri/eruda Donate

Console for Mobile Browsers.

Eruda

Demo

Demo

Browse it on your phone: https://eruda.liriliri.io/

In order to try it for different sites, execute the script below on browser address bar.

javascript:(function () { var script = document.createElement('script'); script.src="//cdn.jsdelivr.net/npm/eruda"; document.body.appendChild(script); script.onload = function () { eruda.init() } })();

Features

  • Console: Display JavaScript logs.
  • Elements: Check dom state.
  • Network: Show requests status.
  • Resource: Show localStorage, cookie information.
  • Info: Show url, user agent info.
  • Snippets: Include snippets used most often.
  • Sources: Html, js, css source viewer.

Install

You can get it on npm.

npm install eruda --save

Add this script to your page.


It's also available on jsDelivr and cdnjs.


The JavaScript file size is quite huge(about 100kb gzipped) and therefore not suitable to include in mobile pages. It's recommended to make sure eruda is loaded only when eruda is set to true on url(http://example.com/?eruda=true), for example:

;(function () {
    var src = '//cdn.jsdelivr.net/npm/eruda';
    if (!/eruda=true/.test(window.location) && localStorage.getItem('active-eruda') != 'true') return;
    document.write('');
    document.write('eruda.init();');
})();

Configuration

When initialization, a configuration object can be passed in.

  • container: Container element. If not set, it will append an element directly under html root element.
  • tool: Choose which default tools you want, by default all will be added.

For more information, please check the documentation.

let el = document.createElement('div');
document.body.appendChild(el);

eruda.init({ container: el, tool: ['console', 'elements'] });

Plugins

If you want to create a plugin yourself, follow the guides here.

Related Projects

Contribution

Read Contributing Guide for development setup instructions.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.