[ANN] LiveConsole 0.1.0 -- eval code against a running program with IRB

P

Pete Elmore

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. :)
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.
 
P

Pete Elmore

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top