Trona

Chrome DevTools Custom Formatter for Opal

Installation


  1. Make sure you are using Chrome
  2. Drag Trona to your bookmark bar.
  3. In DevTools / Settings, toggle Enable custom formatters as on.

Usage


  1. Make sure you are in a Opal Ruby app. (e.g. this page)
  2. Click the bookmarklet.
  3. From now on, Ruby object log by console will be formatted for easier inspection.
  4. Try type Opal.hash({a: 10})in console or Run , and you will see it's formatted as a Hash object.

FAQ


Why puts not work?

Kernel.puts will transform object to String, thus the output will remain plain text. Require console and use $console.log instead.

require "console"
$console.log({a: 10, foo: :bar})

Will Trona be open sourced?

Yes! Making the tool open sourced is definitely planned :) Feel free to open an issue if you got any problem.