Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

debugging a rails app with rubymine

I have a Rails app using Ruby 1.8.7 and I'm getting this error when running in debug mode and setting a break point:

54749: Exception in DebugThread loop: undefined method `errmsg' for #<Debugger::ControlState:0x10e3def28>
Backtrace:
/Users/ohad/.rvm/gems/ruby-1.8.7-p371/gems/ruby-debug-0.10.4/cli/ruby-debug/command.rb:188:in `errmsg'
  from: /Users/ohad/.rvm/gems/ruby-1.8.7-p371/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/breakpoints.rb:81:in `execute'
  from: /Users/ohad/.rvm/gems/ruby-1.8.7-p371/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide/ide_processor.rb:89:in `process_commands'
  from: /Users/ohad/.rvm/gems/ruby-1.8.7-p371/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide/ide_processor.rb:86:in `catch'
  from: /Users/ohad/.rvm/gems/ruby-1.8.7-p371/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide/ide_processor.rb:86:in `process_commands'
  from: /Users/ohad/.rvm/gems/ruby-1.8.7-p371/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide.rb:121:in `start_control'
  from: /Users/ohad/.rvm/gems/ruby-1.8.7-p371/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide.rb:103:in `initialize'
  from: /Users/ohad/.rvm/gems/ruby-1.8.7-p371/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide.rb:103:in `new'
  from: /Users/ohad/.rvm/gems/ruby-1.8.7-p371/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide.rb:103:in `start_control'
  from: /Users/ohad/.rvm/gems/ruby-1.8.7-p371/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide.rb:65:in `start_server'
  from: /Users/ohad/.rvm/gems/ruby-1.8.7-p371/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide.rb:69:in `prepare_debugger'
  from: /Users/ohad/.rvm/gems/ruby-1.8.7-p371/gems/ruby-debug-ide-0.4.17.beta16/lib/ruby-debug-ide.rb:83:in `debug_program'
  from: /Users/ohad/.rvm/gems/ruby-1.8.7-p371/gems/ruby-debug-ide-0.4.17.beta16/bin/rdebug-ide:109
  from: -e:1:in `load'
  from: -e:1

I've added ruby-debug to my Gemfile:

group :development do
  gem "inaction_mailer", '0.6', :require => 'inaction_mailer/force_load'
  gem 'ruby-debug', :require => nil
  # gem 'bullet'
  # gem "ruby-growl"
end
like image 270
WebQube Avatar asked Feb 09 '13 01:02

WebQube


People also ask

How do I debug in RubyMine?

General debugging procedure (Optional) Configure the debugger settings in the Settings/Preferences | Build, Execution, Deployment | Debugger page. If necessary, create or modify an existing run/debug configuration. Place breakpoints in your code. Start the debugger session.

What is RubyMine used for?

RubyMine is an integrated development environment (IDE) that helps you be more productive in every aspect of Ruby/Rails projects development - from writing and debugging code to testing and deploying a completed application. RubyMine is available for different platforms including macOS, Windows, and Linux.

How do you create a breakpoint in RubyMine?

Set breakpointsClick the gutter at the executable line of code where you want to set the breakpoint. Alternatively, place the caret at the line and press Ctrl+F8 . To set a temporary line breakpoint, press Ctrl+Alt+Shift+F8 . The breakpoint will be removed from your project right after it is hit.

Is RubyMine good?

RubyMine Reviews & Product Details It offers smart code completion and analysis, easy code navigation, safe automated refactorings, an interactive debugger, Git workflow support, and many other tools all integrated together in a highly customizable, productive, user-friendly environment.


1 Answers

You have ruby-debug gem installed, remove it.

See this answer, only 2 debug gems are needed (versions will be different for Ruby 1.8):

ruby-debug-base (0.10.5.rc3)
ruby-debug-ide (0.4.17.beta16)
like image 74
CrazyCoder Avatar answered Sep 30 '22 15:09

CrazyCoder