LiveConsole 0.1.0 -- eval code against a running program with IRB

I quit my job, and that can only mean one thing: time to release a new
gem.

About:

LiveConsole is a library for providing IRB over a TCP connection . If
you add it to your application, you can run arbitrary code against
your application. For example, you can:
* Inspect the state of a running application
* Change the state of the application
* Patch code on the fly, without a restart.
* Let anyone on the net 0wn you if you bind to anything other
than
localhost. :slight_smile:
It’s useful as a diagnostic tool, a debugging tool, and a way to
impress your friends or get those Lisp guys off your back. You know
the ones I mean.

Installation:

    gem install live_console

There’s also rubyforge.org/projects/live-console , which has tar’d
source.

Usage:

    lc = LiveConsole.new 1337 # Creates a LiveConsole on port 1337

Not yet accepting connections.
lc.run # Starts the LiveConsole thread
At this point, users can connect and get an IRB prompt. It happens in
a different thread, so you get control back.
lc.stop # Kills the LiveConsole thread
Now, no one can connect.

Status:

It’s alpha software for now. There are some things missing, like an
authentication mechanism, some of the niceness of IRB on a real
console (readline, being able to hit ^D, etc.), the ability to use a
named pipe instead of TCP. There shouldn’t be any weird failures, but
I’m not ruling them out.

On Sun, 21 Oct 2007 05:28:42 +0900, Pete E. wrote:

LiveConsole is a library for providing IRB over a TCP connection . If
you add it to your application, you can run arbitrary code against
your application. For example, you can:
* Inspect the state of a running application
* Change the state of the application
* Patch code on the fly, without a restart.

That’s beautiful! Does it work with Rails and/or ruby-debug? All three
together would be the holy grail for debuggability.

I haven’t tested it very thoroughly on Rails, but it seems to work.
It has the added (possible) benefit of not stopping the application
when you use it, unlike Rails’ breakpoint code. As long as you don’t
interfere with running Controllers, it should be fine. YMMV

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs