Ruby execution

can i execute ruby program step by step?
like c language.....pressing F7... i can debug my program.
is there any way to do the same?
thanx

···

--
Posted via http://www.ruby-forum.com/.

Sumanta Das wrote:

can i execute ruby program step by step?
like c language.....pressing F7... i can debug my program.

That is not a feature of C, but the IDE you are using.

is there any way to do the same?

Yes, actually.

gem install ruby-debug

Here's a quick screencast introducing ruby-debug.

If you have ever used it, it is similar to gdb.

- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan

~ How many boards would the Mongols hoard if the Mongol hordes got bored?
      -- Calvin

Sumanta Das wrote:

can i execute ruby program step by step?
like c language.....pressing F7... i can debug my program.
is there any way to do the same?
thanx

ruby -r debug mypgm.rb

Type h at the prompt for help.

···

--
RMagick: http://rmagick.rubyforge.org/
RMagick 2: http://rmagick.rubyforge.org/rmagick2.html

Sumanta Das wrote:

can i execute ruby program step by step?
like c language.....pressing F7... i can debug my program.
is there any way to do the same?
thanx

Hello Sumanta:

In addition to the other good suggestions made by others, you may want to consider purchasing a ruby specific IDE that supports debugging such as Arachno Ruby:

http://www.ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php

Michael

But, is there a way to "debug" just within a particular method? That way one
can skip the rest of the code, which we know "works" fine.

Thanks

Victor

···

On Mon, Apr 14, 2008 at 7:31 AM, Tim Hunter <TimHunter@nc.rr.com> wrote:

Sumanta Das wrote:

> can i execute ruby program step by step?
> like c language.....pressing F7... i can debug my program.
> is there any way to do the same?
> thanx
>

ruby -r debug mypgm.rb

Type h at the prompt for help.

--
RMagick: http://rmagick.rubyforge.org/
RMagick 2: http://rmagick.rubyforge.org/rmagick2.html

Sorry for the side track, but how good/complete is the Linux version of
this IDE (for anyone who knows)?

Thanks.

···

On 2008-04-15, Michael Brooks <michael.brooks@shaw.ca> wrote:

Sumanta Das wrote:

can i execute ruby program step by step?
like c language.....pressing F7... i can debug my program.
is there any way to do the same?
thanx

Hello Sumanta:

In addition to the other good suggestions made by others, you may want
to consider purchasing a ruby specific IDE that supports debugging such
as Arachno Ruby:

http://www.ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php

Michael

--

Victor Reyes wrote:

But, is there a way to "debug" just within a particular method? That way
one
can skip the rest of the code, which we know "works" fine.

Thanks

Victor

That appears to be a feature of the ruby-debug library. A quick Google
"ruby-debug" found this page:
DATANOISE.COM.

···

--
Posted via http://www.ruby-forum.com/\.

Jim Cochrane wrote:

Sumanta Das wrote:

can i execute ruby program step by step?
like c language.....pressing F7... i can debug my program.
is there any way to do the same?
thanx

Hello Sumanta:

In addition to the other good suggestions made by others, you may want to consider purchasing a ruby specific IDE that supports debugging such as Arachno Ruby:

http://www.ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php

Michael

Sorry for the side track, but how good/complete is the Linux version of
this IDE (for anyone who knows)?

Thanks.

Hello Jim:

I can't speak to the Linux version because I've only tried (and purchased) the Windows version which is very good. I'm coming from Delphi so something like this IDE really eases the shock. The only significant thing missing compared to Delphi is a GUI builder but I can understand why because there are so many GUI choices for Ruby (I'm partial to wxRuby).

Might I suggest you download the 20 day trial of the Linux version of Arachno Ruby and try it out. There support is good too... I had some really stupid questions during the trial and they politely answered all of them.

Michael

···

On 2008-04-15, Michael Brooks <michael.brooks@shaw.ca> wrote:

Victor Reyes wrote:

But, is there a way to "debug" just within a particular method? That way one
can skip the rest of the code, which we know "works" fine.

[snip]

Sure. Having recently learned the wonders of ruby-debug, I can tell you this: you can set a breakpoint in the method, then step through it from that point on, examining variables (and doing a lot of other useful things) to your hearts content. When ready, you can resume regular execution. Very nicely set up, I think you'll find. And...it's all command line stuff.

t.

···

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC
Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website & psychotherapy weblog) << sleightmind.wordpress.com >> (mental health issues weblog)
<< directpathdesign.com >> (web site design & consultation)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I followed the link. Thanks for the info!

···

On Mon, Apr 14, 2008 at 10:02 AM, Tim Hunter <rmagick@gmail.com> wrote:

Victor Reyes wrote:
> But, is there a way to "debug" just within a particular method? That way
> one
> can skip the rest of the code, which we know "works" fine.
>
> Thanks
>
> Victor

That appears to be a feature of the ruby-debug library. A quick Google
"ruby-debug" found this page:
DATANOISE.COM.
--
Posted via http://www.ruby-forum.com/\.

Thanks, Michael, for the suggestion. I'll consider checking out the
trial version when I've "gotten back into Ruby learning mode". (I
started studying Ruby over a year ago, got sidetracked by a Perl job,
and want to get back into learning Ruby, hopefully soon.)

···

On 2008-04-15, Michael Brooks <michael.brooks@shaw.ca> wrote:

Jim Cochrane wrote:

On 2008-04-15, Michael Brooks <michael.brooks@shaw.ca> wrote:

Sumanta Das wrote:

can i execute ruby program step by step?
like c language.....pressing F7... i can debug my program.
is there any way to do the same?
thanx

Hello Sumanta:

In addition to the other good suggestions made by others, you may want
to consider purchasing a ruby specific IDE that supports debugging such
as Arachno Ruby:

http://www.ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php

Michael

Sorry for the side track, but how good/complete is the Linux version of
this IDE (for anyone who knows)?

Thanks.

Hello Jim:

I can't speak to the Linux version because I've only tried (and
purchased) the Windows version which is very good. I'm coming from
Delphi so something like this IDE really eases the shock. The only
significant thing missing compared to Delphi is a GUI builder but I can
understand why because there are so many GUI choices for Ruby (I'm
partial to wxRuby).

Might I suggest you download the 20 day trial of the Linux version of
Arachno Ruby and try it out. There support is good too... I had some
really stupid questions during the trial and they politely answered all
of them.

--

Jim Cochrane wrote:

  

Jim Cochrane wrote:
    

Sumanta Das wrote:
        

can i execute ruby program step by step?
like c language.....pressing F7... i can debug my program.
is there any way to do the same?
thanx
          

Hello Sumanta:

In addition to the other good suggestions made by others, you may want to consider purchasing a ruby specific IDE that supports debugging such as Arachno Ruby:

http://www.ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php

Michael
        

Sorry for the side track, but how good/complete is the Linux version of
this IDE (for anyone who knows)?

Thanks.

Hello Jim:

I can't speak to the Linux version because I've only tried (and purchased) the Windows version which is very good. I'm coming from Delphi so something like this IDE really eases the shock. The only significant thing missing compared to Delphi is a GUI builder but I can understand why because there are so many GUI choices for Ruby (I'm partial to wxRuby).

Might I suggest you download the 20 day trial of the Linux version of Arachno Ruby and try it out. There support is good too... I had some really stupid questions during the trial and they politely answered all of them.
    
Thanks, Michael, for the suggestion. I'll consider checking out the
trial version when I've "gotten back into Ruby learning mode". (I
started studying Ruby over a year ago, got sidetracked by a Perl job,
and want to get back into learning Ruby, hopefully soon.)

Consider also trying the "community" (free) version - which is full featured - of the Aptana Studio ide - it's a full spectrum Ajax-Rails etc. development environment, which encompasses ruby and ruby debugging etc. It's also java, so it's big (but also obviously cross-platform). I have been using it off and on for some time, and it's very nice. Excellent support from the developers, too - very good forums. Still in development, but definitely far along and quite impressive.

t.

···

On 2008-04-15, Michael Brooks <michael.brooks@shaw.ca> wrote:

On 2008-04-15, Michael Brooks <michael.brooks@shaw.ca> wrote:

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC
Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website & psychotherapy weblog) << sleightmind.wordpress.com >> (mental health issues weblog)
<< directpathdesign.com >> (web site design & consultation)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~