[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

debugger problem in 1.9?

Tom Cloyd

5/5/2009 1:07:00 PM

My first attempt to move to ruby 1.9, and it's not going well.

I need the debugger. I usually use the ruby-debug gem, but that's
inexplicably not working in 1.9 - won't install.

So and now I'm invoking the debugger from the command line - and I'm
getting behavior I've never seen before. Basically, it's not obeying
elementary commands. I ask it to run to a specific line, and it stops in
some obscure library, which is of no use to me. Example:

===
tomc@tomc-desktop:~/Ruby-work/setnet/bin$ ruby1.9 -r debug ./setnet
Debug.rb
Emacs support available.

/setnet:7:$: << '../lib/setnet' << '..'
(rdb:1) n 15
/usr/lib/ruby/1.9.0/thread.rb:242:class SizedQueue < Queue
(rdb:1) l
[237, 246] in /usr/lib/ruby/1.9.0/thread.rb
237 # This class represents queues of specified size capacity. The
push operation
238 # may be blocked if the capacity is full.
239 #
240 # See Queue for an example of how a SizedQueue works.
241 #
=> 242 class SizedQueue < Queue
243 #
244 # Creates a fixed-length queue with a maximum size of +max+.
245 #
246 def initialize(max)
(rdb:1)
===

This is nonsense. I said to run to line 15, and it stops at line 242 in
thread.rb - and what THAT is I have no idea. Certainly not MY code. I
don't even know where I am in my code, at this point. This is worse than
useless.

I'm at sea here, as I've never seen this sort of thing happen with the
debugger. Rather, I've used it very extensively and to good effect, in
its ruby-debug form. I've tried a number of things to puzzle this
current problem out, and none are working. Without a working debugger, I
will have to abandon 1.9.

Any ideas to get this working?

Thanks in advance,

Tom