mobileConsolev2 - HTML based JavaScript console

mobileConsolev2 is a further refinement (complete rewrite) of a JavaScript console-emulator I wrote, which provides a way to view console output on devices that don't support this natively/easily (such as Safari on iOS)

It reroutes the native console output and renders it to HTML. This means that you can include mobileConsole in any project, without having to rewrite any existing logging; mobileConsole 'hijacks' all console methods, such as console.log, console.warn, etc. It also outputs global window.onerror errors and sports a command line input.

See it in action below, using the demo-buttons which trigger regular console events, or by entering your own code in the command line. You can freely resize the console by (touchmove/click-)dragging the top bar, or tap/click it once to minimize/restore the console. Clear the console by using the recycle-bin icon.

mobileConsolev2 uses stacktracejs (bundled) for resolving stack traces across all browsers.

Oh, and it even has dark color scheme support!




Using it yourself

Head on over to mobileConsole at GitHub to grab the code, and make sure you grab the accompanying CSS as well (place it in the same dir as mobileConsole's script).

Place the script as early as possible. If possible, immediately after the <head> opening tag, or at the very least before all other scripts.


© 2016 - 2022 hnldesign