[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

debug flag being ignored

Tom Allison

8/31/2006 3:50:00 AM

I'm trying to run 'ruby -d foo.rb' and the d is either ignored or I don't
understand how it works. The code just runs as if there is no -d option.

Does this require something at compile time of Ruby that I might have overlooked?

2 Answers

Logan Capaldo

8/31/2006 4:16:00 AM

0


On Aug 30, 2006, at 11:49 PM, Tom Allison wrote:

> I'm trying to run 'ruby -d foo.rb' and the d is either ignored or I
> don't understand how it works. The code just runs as if there is
> no -d option.
>
> Does this require something at compile time of Ruby that I might
> have overlooked?
>

Maybe you wanted ruby -rdebug -d foo.rb ?

rickhg12hs

8/31/2006 5:44:00 AM

0

> I'm trying to run 'ruby -d foo.rb' and the d is either ignored or I don't
> understand how it works. The code just runs as if there is no -d option.

"-d" sets $DEBUG to true.

Does your code execute something when $DEBUG is true?

For example:

puts "Important intermediate value: #{my_critical_var}" if $DEBUG