All,
I stumbled across this handy little debugging tool the other day when I
was trying to find a tool that would display/trace the execution of my
test script. This tool called "Unroller" will print out each line of
code that is executed along with the values of the variable passed into
and returned from methods. (optionally it will also keep track of local
variables.)  It is very helpful for quickly identifying exactly where
your script died, and what values were causing it to choke.

http://unroller.rubyforge.org/

For some reason I had to install the win32console gem as well to get it
working: http://rubyforge.org/frs/?group_id=1766

Tip: when you invoke the unroller, you may want to "exclude" the common
classes that you don't care about ie watir, string, array ...  So that
it only traces your code.  For example:

    Unroller::trace(:max_depth => 5, :show_locals=>true,:exclude_classes
=>[/Watir/,/String/,/Array/]) do 
        # some watir test script code goes here
    end

I hope some of you find this helpful!
-David
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to