5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RubyMineでdebbugできない

Posted at

#はじめに
RubyMineを使っててbreakpointをセットしようとしたら以下のエラーが出てdebbugができず、解決方法を調べましたのでメモ。

error.log
1711: Exception in DebugThread loop: wrong number of arguments (0 for 1)
Backtrace:
/home/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/debugger-1.6.6/lib/ruby-debug/interface.rb:175:in `read_command'
  from: /home/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.22/lib/ruby-debug-ide/ide_processor.rb:84:in `process_commands'
  from: /home/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.22/lib/ruby-debug-ide.rb:122:in `block in start_control'
[2014-04-28 13:59:31] ERROR SystemExit: exit
	/home/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.22/lib/ruby-debug-ide.rb:126:in `exit'

#回避策
参考:https://gist.github.com/jmandala/1960973

I made sure that my Gemfile didn't have any debug references.

訳(適当)

Gemfileにdebugのreferencesを持っていないことを確認しました

とのこと。Gemfileを確認したらバッチリpry-debuggerの記述が。
こちらをコメントアウトしたら動くようになりました。
RubyMineマジ便利。

Gemfile
group :test, :development do
	gem 'rack-mini-profiler'

	gem 'pry-rails'
	gem 'pry-stack_explorer'

	if RUBY_VERSION >= '2.0.0'
		gem 'pry-byebug'
	else
		# 以下はRuby1.9の時のみ使う(pry-byebugの代わりに)
		# debuggerは1.9以下でしか動作しない, remote は byebug で使えないようになった
		gem 'pry-debugger' #ここをコメントアウトしたよ。
		gem 'pry-remote'
	end

	gem 'better_errors'
	gem 'binding_of_caller'

	gem 'awesome_print'
end

このGemfileはRails4 今のところ最強なデバッグツール達を参考にさせていただきました。

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?