Showlog will start automatically.
console.log as usual and the message will get displayed on screen. For example, this page console logs the (x, y) coordinates of the user pointer.
The number> before the angle bracket is a counter. It counts how many times logging has been called and it helps discriminate between consecutive messages.
Stop logging messages on screen with the
Start logging messages on screen with the
Display messages on screen only with the
A boolean attached to
showlog tells whether Showlog is running or not:
- Basic logging: display simple messages to allow for log and hunt debugging. Automatic object formatting is not included.
- Minimal UI: messages should use as little screen real estate as possible. On-screen messages should not take pointer events or interfere with the user input.
- No harm: the native behavior of console.log should not be altered. Specifically, the browser’s console object formatting should not be modified in any way.
Screenlog.js, Kushagra Gour, 2015.
Screenlog.js is the closest in spirit to what I was looking for. However, the on-screen panel is bigger than what I need and it takes user input. Moreover, because screenlog.js does some work on the message passed to console.log in order to format objects, the browser’s native console formatting is altered.
mobileConsole, Klaas Leussink, 2016.
mobileConsole spawns an entire custom console on screen. Impressive but overkill for my needs.
Showlog.js is published under the GNU General Public License.