[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

First use of debugger weird

RichardOnRails

3/25/2008 2:16:00 AM

Hi,

I just wrote a toy program:
K:\_Projects\Ruby\_Ruby_Techniques\Debugging\Test2.rb

I invoked the debugger with:
ruby -rdebug K:/_Projects/Ruby/_Ruby_Techniques/Debugging/Test2.rb

I got 5 lines (counting blank lines)
Debug.rb
Emacs support available.

K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/site_ruby/1.8/ubygems.rb:
10:require 'rubygems'
(rdb:1)

I gave the command "list 5" and got:
(rdb:1) list 5
[0, 9] in K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/site_ruby/1.8/
ubygems.rb
1 # This file allows for the running of rubygems with a nice
2 # command line look-and-feel: ruby -rubygems foo.rb
3 #--
4 # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and
others.
5 # All rights reserved.
6 # See LICENSE.txt for permissions.
7 #++
8
9
(rdb:1)

Apparently, it gave me the first lines of debug.rb rather than the
first lines of the program I'm trying to process with the debugger:
Test2.rb.

I used https://www6.software.ibm.com/developerworks/education/os-distruby/sec...
as a guide, and it suggested that the debugging would start with the
subject program.

What am I doing wrong? I'm running ruby186-26_rc2 over WinXP-Pro/SP2.

Thanks in Advance,
Richard
1 Answer

RichardOnRails

3/29/2008 2:17:00 AM

0

On Mar 24, 10:16 pm, RichardOnRails
<RichardDummyMailbox58...@uscomputergurus.com> wrote:
> Hi,
>
> I just wrote a toy program:
> K:\_Projects\Ruby\_Ruby_Techniques\Debugging\Test2.rb
>
> I invoked the debugger with:
> ruby -rdebug K:/_Projects/Ruby/_Ruby_Techniques/Debugging/Test2.rb
>
> I got 5 lines (counting blank lines)
> Debug.rb
> Emacs support available.
>
> K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/site_ruby/1.8/ubygems.rb:
> 10:require 'rubygems'
> (rdb:1)
>
> I gave the command "list 5" and got:
> (rdb:1) list 5
> [0, 9] in K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/site_ruby/1.8/
> ubygems.rb
> 1 # This file allows for the running of rubygems with a nice
> 2 # command line look-and-feel: ruby -rubygems foo.rb
> 3 #--
> 4 # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and
> others.
> 5 # All rights reserved.
> 6 # See LICENSE.txt for permissions.
> 7 #++
> 8
> 9
> (rdb:1)
>
> Apparently, it gave me the first lines of debug.rb rather than the
> first lines of the program I'm trying to process with the debugger:
> Test2.rb.
>
> I used https://www6.software.ibm.com/developerworks/education/os-d......
> as a guide, and it suggested that the debugging would start with the
> subject program.
>
> What am I doing wrong? I'm running ruby186-26_rc2 over WinXP-Pro/SP2.
>
> Thanks in Advance,
> Richard

Apparently, there's little or no interest in the Ruby debugger.

Happily, I found the rdebug plug-in. It works the way I expected.