Yes I googled it and I have found no help. I can't believe none can
actually provide a serious explanation on this. And I say this with base
because the very short section in the Pickaxe barely touches the subject
with an extensive example that fails providing a good start. It helps
only if you have actually debugged previously. As you can see in my
humble try before the "list" command does not return the list of my
demo2.rb program which is only
a = 2
puts a
a = 3
puts a
I need help getting it started, I can get it my own later, so focus your
help on that. Thank you.
P.S: I promise to myself that if I ever get this running I will provide
a simple tutorial on using the Ruby debugger for dummies like me.
···
--
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
···
On 5/25/07, Jorge Domenico Bucaran Romano <jbucaran@gmail.com> wrote:
Yes I googled it and I have found no help. I can't believe none can
actually provide a serious explanation on this. And I say this with base
because the very short section in the Pickaxe barely touches the subject
with an extensive example that fails providing a good start. It helps
only if you have actually debugged previously. As you can see in my
humble try before the "list" command does not return the list of my
demo2.rb program which is only
a = 2
puts a
a = 3
puts a
I need help getting it started, I can get it my own later, so focus your
help on that. Thank you.
P.S: I promise to myself that if I ever get this running I will provide
a simple tutorial on using the Ruby debugger for dummies like me.
--
Posted via http://www.ruby-forum.com/\.
--
If you could create a machine that copies hamburgers — you put one hamburger
in and two equally good hamburgers come out the other side — it would be
unethical not to do so and make it freely available.
Leslie Viljoen 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?
···
On 5/25/07, Jorge Domenico Bucaran Romano <jbucaran@gmail.com> wrote:
--
Posted via http://www.ruby-forum.com/\.
Leslie Viljoen 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.
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/
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?
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/
···
On 5/26/07, Jorge Domenico Bucaran Romano <jbucaran@gmail.com> wrote:
> On 5/25/07, Jorge Domenico Bucaran Romano <jbucaran@gmail.com> wrote:
--
If you could create a machine that copies hamburgers — you put one hamburger
in and two equally good hamburgers come out the other side — it would be
unethical not to do so and make it freely available.
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 Romano <jbucaran@gmail.com> wrote:
Leslie Viljoen wrote:
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.
--
Posted via http://www.ruby-forum.com/\.
--
If you could create a machine that copies hamburgers — you put one hamburger
in and two equally good hamburgers come out the other side — it would be
unethical not to do so and make it freely available.