Invoke irb during execution of code

how do i invoke the irb during the execution of my code.
for eg
require “watir”
ie = Watir::IE.start( url)
invoke irb so that i can inspect the ie and use the ie object
interactively.

Appreciate any help.
seede

ruby-breakpoint, while currently unmaintained, does (did?) just that.

http://rubyforge.org/projects/ruby-breakpoint

martin

Junkone wrote:

how do i invoke the irb during the execution of my code.

IRB is very useful for that. One way to do it:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/244139

On Jun 3, 5:45 pm, Joel VanderWerf [email protected] wrote:

Junkone wrote:

how do i invoke the irb during the execution of my code.

IRB is very useful for that. One way to do it:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/244139


vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

thanks for trying to help. But i am lost with this code. do i have to
call this code from my ruby code or should i call my ruby code from
this code. any additional details would be very very useful.
Regards
Seede

First, run “gem install -r ruby-debug”

I have the following programmed into a hotkey in my text editor:

require ‘ruby-debug’
Debugger.start
debugger

…so whenever I need a breakpoint I hit the key and rerun my program.

Les

Junkone wrote:

thanks for trying to help. But i am lost with this code. do i have to
call this code from my ruby code or should i call my ruby code from
this code. any additional details would be very very useful.

Copy the module…end and class…end part into your code. Then look at
the stuff at the bottom. The simplest use is:

IRB.start_session(x)

where x is the object that will be “self” in the irb session. If you
want the user to be able to look at some local variables as well, use
the form with “binding” as the first argument.

What I say… is why don´t any of you take my job offer seriously…
:frowning: sniff.

LAET. Yazmín M. Cárdenas Rubalcaba

Technical Recruiter

Phone 01 800 087 47 87 Ext 257

Local phone 1368 1745 Ext 257

Av. Mariano Otero 3225 Col. Verde Valle

C.P. 44540 Guadalajara, Jal. México

www.pounceconsulting.com

e-mail. [email protected]

Have you seen/tried Live_Console?
http://rubyforge.org/frs/?group_id=4682&release_id=15655
I’m trying it out on a project.
I’m having some issues, but that’s par 4 me.

aTb
MarkT