On 5/25/07, Jorge Domenico Bucaran R. [email protected] wrote:
^
(rdb:1)
It looks to me like the debugger is getting confused by the colon after
C
drive.
The usage for the ‘b’ command: b[reak] [file:|class:]<line|method>
See? You can specify a file and then a colon and the class etc. but the
debugger is not expecting a colon in the path.
Try just “b 1” to set a breakpoint on line 1.
Les
On 5/25/07, Jorge Domenico Bucaran R. [email protected] 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
Leslie V. wrote:
On 5/25/07, Jorge Domenico Bucaran R. [email protected] 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:
-
Why do I need the rubygems when debugging?
R. In case I am debugging an applicacion that uses the rubygems
extension.
-
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?
On 5/26/07, Jorge Domenico Bucaran R. [email protected] wrote:
Leslie V. wrote:
The last thing I need your help with is:
- Why do I need the rubygems when debugging?
R. In case I am debugging an applicacion that uses the rubygems
extension.
On my windows system, rubygems seems to be included by default via the
setting of
the RUBYOPT environment variable.
–
On 5/26/07, Jorge Domenico Bucaran R. [email protected] wrote:
Here’s my session:
5 # All rights reserved.
test.rb:3:puts a
R. In case I am debugging an applicacion that uses the rubygems
extension.
RugyGems is a platform independent packaging system for Ruby. It lets
you
install
“gems”, which are packages. It gets loaded up before the debugging
starts.
For more info on it, look here: http://rubygems.org/
- 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?
In Ruby you use “require” to load libraries. This is a Ruby basic, so
you
really should
do some reading on these things. It will take an extremely long time to
learn Ruby
by asking these sorts of questions in the forum! Try out one of the
basic
tutorials/manuals:
http://pine.fm/LearnToProgram/
http://www.rubycentral.com/book/
http://poignantguide.net/ruby/