Thursday, April 15, 2010

Debug Ruby Test::Unit::TestCase in Eclipse DLTK

It took me a while to figure out how to debug unit test using DLTK in eclipse.

Originally I tried to debug as "Ruby Test" and the breakpoints in unit test never worked, but it did stop in "rubygems.rb", you can step into the unit test file, but you cannot stop into a test method.

Because using "rdebug test-case.rb" did work in command line, I thought it might be something wrong with my gems. Tried to install a brand new ruby(mingw32 version) and install all gems ruby-debug and ruby-debug-ide. Unfortunately, it still didn't work.

Finally I found it is pretty ease to debug the unit test. The trick is "Debug as Ruby Script", you will stop at the breakpoint you set.

No comments:

Post a Comment