mobileConsole - HTML based JavaScript console

Update 04-2022
Head over here to check out mobileConsole v2, which is faster, smaller (53kB/513 lines vs 60kB/1.502 lines) and more compatible (using stacktracejs).

MobileConsole is a script I wrote that extends the browser's (JavaScript) console to a visual console (in HTML). Which is very useful when debugging on a mobile device with no on-screen local debugger/console access.

Demo

To see how it works, use the buttons below to trigger regular console events, and watch mobileConsole handling them. You can also open your Web Inspector's console, to see what is happening over there.

MobileConsole is configured to run automatically on mobile devices, but should the mobile detection fail, it can be manually initiated with mobileConsole.init();, as is the case on this demo-page.

Console input / commandline

As of v0.5, mobileConsole features a console input (bottom field, with the >), in which you can execute your own scripts, set and check variables, etc. Just like in a regular debugger. Command history is stored (in session storage, if available) and can be recalled using up and down arrows. The commandline also sports an autocomplete-based pop-up, which is especially useful on mobile devices.

Read more about mobileConsole here, view/fork code @ GitHub here




© 2016 - 2024 hnldesign