From: Brian Candler Date: 2009-01-19T19:31:45+09:00 Subject: Re: Connecting to a running ruby process Piyush Ranjan wrote: > Hi! > Is there any way you can connect to a running ruby process (for instance > a > mongrel) and 'talk' to it like we can do in lisp using slime ? Try the ruby-debug gem (which is what rails uses). Unfortunately, the supplied documentation is pretty poor, but there is a pretty good doc at http://bashdb.sourceforge.net/ruby-debug.html Separate process debugging can be done via rdebug command line flags, or by calling Debugger methods explicitly: $ cat p1.rb require 'rubygems' require 'ruby-debug' Debugger.wait_connection = true Debugger.start_remote Debugger.post_mortem Debugger.breakpoint a = 1 - 1 b = 2 / a c = a + b puts c $ ruby p1.rb In another window: rdebug -c to single step, inspect variables etc. in the first process. -- Posted via http://www.ruby-forum.com/.