Debugger not working with Ruby 1.8.7 on RM 5.0.1

Hi. I'm using RubyMine 5.0.1 on OS X Mountain Lion with a Ruby 1.8.7 project. When I fire up the debugger and click to create a breakpoint there is long delay and then finally the IDE spits out this error:

44488: Exception in DebugThread loop: undefined method `errmsg' for #<Debugger::ControlState:0x16614c>
Backtrace:
/Users/cstump/.rvm/gems/ruby-1.8.7-p371@nucore-nu/gems/ruby-debug-0.10.3/cli/ruby-debug/command.rb:161:in `errmsg'
  from: /Users/cstump/.rvm/gems/ruby-1.8.7-p371@nucore-nu/gems/ruby-debug-0.10.3/cli/ruby-debug/commands/breakpoints.rb:81:in `execute'
  from: /Users/cstump/.rvm/gems/ruby-1.8.7-p371@nucore-nu/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide/ide_processor.rb:89:in `process_commands'
  from: /Users/cstump/.rvm/gems/ruby-1.8.7-p371@nucore-nu/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide/ide_processor.rb:86:in `catch'
  from: /Users/cstump/.rvm/gems/ruby-1.8.7-p371@nucore-nu/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide/ide_processor.rb:86:in `process_commands'
  from: /Users/cstump/.rvm/gems/ruby-1.8.7-p371@nucore-nu/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide.rb:121:in `start_control'
  from: /Users/cstump/.rvm/gems/ruby-1.8.7-p371@nucore-nu/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide.rb:103:in `initialize'
  from: /Users/cstump/.rvm/gems/ruby-1.8.7-p371@nucore-nu/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide.rb:103:in `new'
  from: /Users/cstump/.rvm/gems/ruby-1.8.7-p371@nucore-nu/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide.rb:103:in `start_control'
  from: /Users/cstump/.rvm/gems/ruby-1.8.7-p371@nucore-nu/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide.rb:65:in `start_server'
  from: /Users/cstump/.rvm/gems/ruby-1.8.7-p371@nucore-nu/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide.rb:69:in `prepare_debugger'
  from: /Users/cstump/.rvm/gems/ruby-1.8.7-p371@nucore-nu/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide.rb:83:in `debug_program'
  from: /Users/cstump/.rvm/gems/ruby-1.8.7-p371@nucore-nu/gems/ruby-debug-ide-0.4.17.beta16/bin/rdebug-ide:109
  from: -e:1:in `load'
  from: -e:1
[2013-02-18 13:34:25] ERROR SystemExit: exit
 /Users/cstump/.rvm/gems/ruby-1.8.7-p371@nucore-nu/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide.rb:125:in `exit'



Here are the relevant gems I have installed:

ruby-debug (0.10.3)
ruby-debug-base (0.10.5.rc1, 0.10.3)
ruby-debug-ide (0.4.17.beta16)



If I remove them all and let the IDE do the debug env install then it pulls in ruby-debug-base (0.10.5.rc1) and ruby-debug-ide (0.4.17.beta16), which leads to the IDE complaining that ruby-debug (0.10.3) is not installed. I then have to install it manually and it pulls in ruby-debug-base (0.10.3)

Please help. Thanks.
3 comments

Hi,

it looks like you have ruby-debug gem in your Gemfile.  Am I right?
It is a known problem that ruby-debug conflicts with ruby-debug-ide.
If this is the case you can workaround this by mofdifing your Gemfile to not require ruby-debugger
when application is executed under RubyMine (see http://youtrack.jetbrains.com/issue/RUBY-11800#comment=27-417333 for details)

Regards, Oleg

0

Thanks, that works. Not sure why I didn't have to do that for RM versions < 5.0 though..

0

For the record here's what worked for me. In my Gemfile I changed:

gem 'ruby-debug', '0.10.3'

to:

gem 'ruby-debug', '0.10.3', ENV['RM_INFO'] ? { :require => false } : {}

0

Please sign in to leave a comment.