program tracing in Test::Unit

A

aidy.lewis

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
 
R

Roger Pack

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,157
Latest member
MercedesE4
Top