From: Dick Summerfield Date: 2007-06-25T06:00:44+09:00 Subject: Re: Ruby Debugger Thanks Jason, that definitely helps. I haven't been able to get it to work yet when rubygems is loaded (but will keep experimenting). However when I remove "RUBYOPT= -rubygems" from the environment the debugger works just like the book says it should :-). That should be "books" because apart from PA there is a "Debugging Ruby programs 101" from IBM, but neither mention the effect of the RUBYOPT environment parameter. Too UNIX oriented, perhaps?? Thanks, Dick. At 22:09 24/06/2007, you wrote: >What I tend to do is load the debugger, then set a breakpoint at the line in >my code I want to debug: > > > ruby -r debug my_file.rb >Debug.rb >Emacs support available. > >C:/ruby-1.8.6/lib/ruby/site_ruby/1.8/ubygems.rb:10:require 'rubygems' >(rdb:1) b my_file.rb:7 >Set breakpoint 1 at mongrel_proxy.rb:7 >(rdb:1) c > >This would set up my code to hit a breakpoint at line #7. > >HTH, >Jason > >-----Original Message----- >From: Dick Summerfield [mailto:ds@iae.nl] >Sent: Sunday, June 24, 2007 4:00 PM >To: ruby-talk ML >Subject: Ruby Debugger > >Hello everybody, > >Ruby nuby here. >I'm doing my best to sort out problems for myself but this one has me >stumped. >I decided to try out the Ruby debugger after reading about it in the >Pickaxe, but when I >try to list the script-to-be-debugged, I always get the same output - >i.e. from ubygems.rb >as shown below - (Ch4_1.rb is just a tiny script from Chris Pine's >_Learn to Program_ ): > >C:\ruby\usr\LtP>ruby -d -rdebug Ch4_1.rb >Debug.rb >Emacs support available. > >c:/ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10:require 'rubygems' >(rdb:1) list 1-9 >[1, 9] in c:/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 > >It does'nt matter what script I take as input, the result is always the >same. >Can anyone please tell me what I'm doing wrong, based in this? >Regards, >Dick Summerfield >Eindhoven, >Netherlands. > > > >-- >No virus found in this outgoing message. >Checked by AVG Free Edition. >Version: 7.5.472 / Virus Database: 269.9.6/863 - Release Date: 23/06/2007 >11:08 > > > > > > > >-- >No virus found in this incoming message. >Checked by AVG Free Edition. >Version: 7.5.472 / Virus Database: 269.9.6/863 - Release Date: >23/06/2007 11:08 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.9.6/863 - Release Date: 23/06/2007 11:08