On 25 May 2007, at 12:18, Jorge Domenico Bucaran Romano wrote:

> Also, why does it shows this:
>
> C:/Program Files/Ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10:require
> 'rubygems'
>
> Not that I care much about it, since all I want to be able to  
> debug, but
> I'd like to know what is it.
>
> -- 
> Posted via http://www.ruby-forum.com/.
>

You've told it (via your environment settings from looking at that  
line) to load rubygems. Loading rubygems executes Ruby code. The  
debugger is preparing to debug that code. Once you are past that code  
you can start to debug your program.

As I said, you need to set breakpoints in your script and jump to  
those breakpoints. E.g:

[alexg / powerbook]/Users/alexg/Desktop(7): cat test.rb
a=1
puts a
[alexg / powerbook]/Users/alexg/Desktop(8): ruby -rdebug -rubygems test.rb
Debug.rb
Emacs support available.

/usr/local/lib/ruby/site_ruby/1.8/ubygems.rb:10:require 'rubygems'
(rdb:1) b test.rb:1
Set breakpoint 1 at test.rb:1
(rdb:1) c
Breakpoint 1, toplevel at test.rb:1
test.rb:1:a=1
(rdb:1) list
[-4, 5] in test.rb
=> 1  a=1
    2  puts a
(rdb:1)

Alex Gutteridge

Bioinformatics Center
Kyoto University