Cannot debug tests with RM 4.0.2 on OS X Lion

I'm using RubyMine 4.0.2 (build #RM-113.31) on OS X Lion. I use Test::Unit with Spork. When I right-click on a test or class name and select "Debug" the debugging window opens but the debugger quickly exits. Here is the output:

/Users/stump/.rvm/rubies/ruby-1.9.3-p125/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/stump/.rvm/gems/ruby-1.9.3-p125@master/gems/ruby-debug-ide-0.4.17.beta8/bin/rdebug-ide --port 55106 -- /Users/stump/Code/vites/test/unit/ecomm/product_test.rb
Fast Debugger (ruby-debug-ide 0.4.17.beta8, ruby-debug-base 0.11.30.pre10) listens on

Process finished with exit code 0

Here are the relevent gems:
[stump@cambridge vites]$ gem list | grep debug
ruby-debug-base19x (0.11.30.pre10)
ruby-debug-ide (0.4.17.beta8)

This happens when running Rails 3.2.2 with Ruby 1.9.3-p125 and also when running Rails 3.1.3 with Ruby 1.9.2-p290. Note that I am able to start the Webrick server in debug mode and debug with it.

Please help me get the debugger working with tests! Thank you.
Comment actions Permalink


Also, I'm finding that the test runner sometimes cannot attach. Often I get "Unable to attach test reporter to test framework or test framework quit unexpectedly" error. Why would that be? It's inconsistent, but happening more frequently.

Comment actions Permalink

This is embarrassing, but the test I was trying to right-click run/debug was actually a module I include in my tests. It wasn't an actual test class, which is why the test process exited immediately.

However, the problem with the test runner not attaching was real. I figured out that was due to the current directory not being on the load path in my test configuration. I found a YouTrack issue that dealt with this very problem and helped me resolve. I'm not sure how that got lost in my config -- I've been running Ruby 1.9.2 for awhile and had been able to run/debug tests just fine. Perhaps my "Ruby arguments" string in my test config was messed with during an upgrade?

Case closed.

Please sign in to leave a comment.