[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

ruby -dn; levels for $DEBUG

Gavin Kistner

6/30/2005 2:37:00 PM

I would find it convenient if:
ruby -d foo.rb
set $DEBUG to true, while
ruby -d1 foo.rb
set $DEBUG to 1
ruby -d3 foo.rb
set $DEBUG to 3, and possibly even
ruby -dALL foo.rb
set $DEBUG to "ALL". (I'm willing to give up that last, though.)

This would break any existing code that did something silly like:
if $DEBUG == true
instead of
if $DEBUG
but would provide the ability to set verbosity level for debugging.

In debugging JavaScript in HTML, I wrote my own DebugOut function
which took a string and a verbosity level, and by changing one
numeric at the top of the file could easily see more or less verbose
traces of the code execution. It's a poor substitute for a debugging
IDE, but at the same time quite helpful.

What do people think?


1 Answer

Ara.T.Howard

6/30/2005 3:12:00 PM

0