[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

program tracing in Test::Unit

aidy

11/29/2007 2:39:00 PM

Hi,

I am using Test::Unit and I seem to be in an infinite loop. My visual
de-bugger (netbeans) keeps bombing out and I am unable to locate where
the problem is. Is it possible to print program execution tracing with
Test::Unit?

If so, could anyone provide an example?

Aidy
1 Answer

Roger Pack

11/30/2007 2:33:00 AM

0

I'd run the tests one at a time, figure out which one is bugging.
Then step through it
require 'ruby-debug'
debugger

Another option I've used in multi-threaded environments is to have a
thread that check for existence of a file and drops into a debugger
should it exist (so you can create that file should a loop appear, and
examine the running threads to see where they're at). similar to
Thread.new {
loop do
if File.exist? 'stop_now'
require 'ruby-debug'
debugger
end
sleep 1
end
}

GL.
-Roger
aidy.lewis@googlemail.com wrote:
> Hi,
>
> I am using Test::Unit and I seem to be in an infinite loop. My visual
> de-bugger (netbeans) keeps bombing out and I am unable to locate where
> the problem is. Is it possible to print program execution tracing with
> Test::Unit?
>
> If so, could anyone provide an example?
>
> Aidy

--
Posted via http://www.ruby-....