[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

invoke irb during execution of code

Junkone

6/3/2008 5:05:00 PM

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
6 Answers

Martin DeMello

6/3/2008 5:54:00 PM

0

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

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

martin

On Tue, Jun 3, 2008 at 10:04 AM, Junkone <junkone1@gmail.com> wrote:
> 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
>
>

Joel VanderWerf

6/3/2008 9:46:00 PM

0

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-t...

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

Junkone

6/4/2008 7:34:00 PM

0

On Jun 3, 5:45 pm, Joel VanderWerf <vj...@path.berkeley.edu> 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-t...
>
> --
>        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

Leslie Viljoen

6/4/2008 8:39:00 PM

0

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




On 6/4/08, Junkone <junkone1@gmail.com> wrote:
> On Jun 3, 5:45 pm, Joel VanderWerf <vj...@path.berkeley.edu> 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-t...
>>
>> --
>> 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
>
>


--
[we need your code-fu] : www.zadic.co.za

Joel VanderWerf

6/4/2008 11:10:00 PM

0

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.

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

Mark T

6/4/2008 11:44:00 PM

0

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

aTb
MarkT

On Wed, Jun 4, 2008 at 3:04 AM, Junkone <junkone1@gmail.com> wrote:
> 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
>
>