# Program tracing in Test::Unit

**URL:** <https://www.ruby-forum.com/t/program-tracing-in-test-unit/121635>\
**Category:** Ruby\
**Created:** [November 29, 2007, 3:40pm UTC](https://www.ruby-forum.com/t/program-tracing-in-test-unit/121635 "2007-11-29T15:40:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 29, 2007, 3:40pm UTC](https://www.ruby-forum.com/t/program-tracing-in-test-unit/121635/1 "2007-11-29T15:40:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 30, 2007, 3:32am UTC](https://www.ruby-forum.com/t/program-tracing-in-test-unit/121635/2 "2007-11-30T03:32:38Z")

</div>

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  
removed\_email\_address@domain.invalid 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
