About Console.Re

Console.Re is remote JavaScript development console. You can send log, debug or test information from any webpage, web mobile app or node.js server to remote logger and view results on any device: tablet, phone or desktop in a separate browser window.

Connector script extends console object adding new methods for sending messages to remote logger with:

console.re.log(); console.re.info(); console.re.debug(); console.re.warn(); console.re.error(); console.re.count(); console.re.test(); console.re.assert(); console.re.time(); console.re.timeEnd(); console.re.trace(); console.re.clear();

Moreover, while using in browsers, you can log information about DOM elements, CSS properties, track Media Queries and Window size changes with:

console.re.size(); console.re.css(); console.re.media();

Supported Platforms

Connector (client) script works in all major browsers (desktop or mobile) and node.js servers running on Linux, Mac, and Windows.

Desktop browsers:

  • Internet Explorer 6+
  • Google Chrome 4+
  • Mozilla Firefox 3+
  • Apple Safari 3+
  • Opera 10+

Mobile browsers:

  • iPhone Safari
  • iPad Safari
  • Android WebKit
  • WebOs WebKit
  • Smart TV

Servers:

  • Node.js
  • Shell via Command Line Interface

Features

  • Realtime, cross browser development and device independent testing
  • Remote logging and debugging with extended console API
  • View logs on any mobile device, tablet or phones (iOS, Android, Windows)
  • Easy to read, log output for Objects, Array, JSON, HTML and CSS
  • Faster Responsive Design development with Media Query logging and tracking
  • Watch Media Query changes on browser resize and device orientation change
  • Using [BBcodes] display log information in different styles and colors
  • Better logging output with string and number interpolation using %s and %d
  • Connector script is light, framework independent, pure JavaScript solution
  • Supports major browsers and can be used for desktop and mobile web apps
  • Works on server in Node.js running on Linux, Mac, Windows
  • Command line (CLI) on server allows to send remote logs from OS shell

Enjoy faster web development process!

How to install

First, install connector script then use Console API from your JavaScript.

Install with single <script> tag

1) open your main HTML file and include connector.js script FIRST thing in <head> tag or BEFORE any other scripts:

Show example


            

2) [required] change YOUR-CHANNEL-NAME in attribute data-channel to your-project-channel-name (any string), save HTML file.

3) add in your JavaScript code:

4) open console remote logger in a separate browser on your favorite device: http://console.re/your-project-channel-name

5) reload your webpage or app and you should see in logger the following output: [LOG] remote log test

Install with inline JavaScript code

1) in case you don't have access to head, include this code BEFORE your JavaScript:

2) [required] change YOUR-CHANNEL-NAME in key channel to your-project-channel-name (any string)

3) in your JavaScript code, use consolere.ready() callback to wrap console.re API:

4) open console remote logger in a separate browser on your favorite device: http://console.re/your-project-channel-name

5) reload your webpage or app and you should see in logger the following output: [LOG] remote log test

Installation for Node.Js

1) Install console-remote-client module using npm:

2) In your node.js app, use require to include module and connect to remote server:

3) [required] change connect function argument YOUR-CHANNEL-NAME to your own your-project-channel-name (any string)

4) add in your code:

4) open console remote logger in a separate browser on your favorite device: http://console.re/your-project-channel-name

5) restart your node.js app, and you should see in logger the following output: [LOG] remote log test

Random Channel Name

You can directly open random channel name using shortcut url http://console.re/new, then click on How to Connect? link to see connection instruction.

Console.Re API

console.re.log()

Sends LOG level message with object, array, string, number or DOM Element to the remote console.

console.re.info()

Sends INFO level message to remote console with optional arguments same as console.re.log().

console.re.warn()

Sends WARN level message to remote console with optional arguments same as console.re.log().

console.re.debug()

Sends DEBUG level message to remote console with optional arguments same as console.re.log().

console.re.error()

Sends ERROR level message to remote console with optional arguments same as console.re.log().

console.re.size()

Displays size of DOM element(s), width and height for given selector(s) or displays current Window size if called with no arguments. Use any jQuery selectors if jQuery library included in project. Browser only API.

console.re.css()

Displays value of specified CSS properties in array for given selector(s). Use any jQuery selectors if jQuery library included in project. Browser only API.

console.re.media()

Displays value of CSS Media Queries for current Window size. An optional 'watch' argument sets listener to display value of Media Queries on browser's resize or device's orientation change events. Browser only API.

Displays all types of Media Queries for current Window size included screen and print. Browser only API.

console.re.time()

Creates a new timer under the given label. To stop timer and display time result, call console.re.timeEnd(label); with the same label.

console.re.timeEnd()

Stops timer and displays time result started before with given label.

console.re.count()

Displays the number of times count call with given label was executed.

console.re.test()

Displays result of test for given expression, object, string, array, number.

console.re.assert()

Tests if a given expression is true. Only if false, it will display an error message.

console.re.trace()

Displays stack trace of JavaScript execution at the point where it was called.

console.re.clear()

Clears remote console logs.

Usage Examples

Remote logging String or Number value with interpolation.

Try it HERE or jsFiddle

Remote logging {Object} and its content.

Try it HERE or jsFiddle

Remote logging [Array] and its content.

Try it HERE or jsFiddle

Remote logging DOM elements and its HTML content with JavaScript or jQuery selectors.

Try it HERE or jsFiddle

Remote logging test results for given expression.

Try it HERE or jsFiddle

Remote logging message if a given expression is not true.

Try it HERE or jsFiddle

Remote logging time passed between timer start and end calls with the same label.

Try it HERE or jsFiddle

Remote logging number of times counter called with the same label.

Try it HERE or jsFiddle

Remote logging size in pixels of DOM elements or Window.

Note: using jQuery selectors requires jQuery library to be included in your project.

Try it HERE or jsFiddle

Remote logging CSS properties for specified DOM elements.

Note: using jQuery selectors requires jQuery library to be included in your project.

Try it HERE or jsFiddle

Remote logging Media Query rules used for current Window size.

Try it HERE or jsFiddle

Remote logging JavaScript Stack Trace information.

Try it HERE or jsFiddle

Using [BBcodes] you can send message to remote logger in styles, colors and size:

Try it HERE or jsFiddle

List of available [BBcodes]:

    styles:
  • [b]bold[/b] [i]italic[/i] [u]underline[/u] [s]strike-through[/s] [size=X]1-20[/size]
  • colors:
  • [red] [green] [blue] [yellow] [orange] [lime] [white] [black]

Clearing remote logger console before sending a new messages.

Try it HERE or jsFiddle

Try all-in-one Console.Re API Demo on jsFiddle

Private Servers

For moderate use, you can connect and see your logging information on public server at http://console.re for FREE. No registration required. Just install connector script and use any string as your channel name.

All information sent to the public server will be open for anyone who knows your channel name.

If you need private and more secure solution, we can offer a dedicated or virtual servers for personal or corporate usage. We can provide a complete solution where you can use your own Remote JavaScript Console server installed behide your firewall, inside your private network.

If you are interested, please contact us with additional information about your company size and approximate number of users.

In addition, we can provide custom solution with full support for the large clients. We can customize logger server software and connector API to fit customers' unique needs.

CONTACT US

Feel free to contact us with any questions, feedback, bug reporting, feature request or if you are interested in private server solution, its distribution, commercial usage and support.

We can offer a dedicated or virtual server for personal or corporate usage. Fill out this form to request a quote for private server: