From: Jorge Domenico Bucaran Romano Date: 2007-05-26T12:07:30+09:00 Subject: Re: Ruby - Debugging Leslie Viljoen wrote: > On 5/25/07, Jorge Domenico Bucaran Romano wrote: >> puts a >> Posted via http://www.ruby-forum.com/. > Ok, I have something. > > I saved your little program as "test.rb". When you set the breakpoint, > just > use the filename, not the path. > Here's my session: > > C:\Documents and Settings\lesliev>ruby -rdebug test.rb > Debug.rb > Emacs support available. > > c:/ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10:require 'rubygems' > (rdb:1) b test.rb:3 > Set breakpoint 1 at test.rb:3 > (rdb:1) list > [5, 14] in c:/ruby/lib/ruby/site_ruby/1.8/ubygems.rb > 5 # All rights reserved. > 6 # See LICENSE.txt for permissions. > 7 #++ > 8 > 9 > => 10 require 'rubygems' > (rdb:1) run > c:/ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10:undefined local variable or > method `run' for main:Object > (rdb:1) c > Breakpoint 1, toplevel at test.rb:3 > test.rb:3:puts a > (rdb:1) list > [-2, 7] in test.rb > 1 > 2 a = 2 > => 3 puts a > 4 a = 3 > 5 puts a > 6 > 7 > (rdb:1) > > > > > Les Great! It worked. Thank you Les, now I have a lot work to do. The last thing I need your help with is: 1. Why do I need the rubygems when debugging? R. In case I am debugging an applicacion that uses the rubygems extension. 2. Does that means that I need to include any library I am also debugging? If so: 2.1. How do I add one? 2.2. How do I delete one? -- Posted via http://www.ruby-forum.com/.