RubyMine 2 Debugging Issue Resolved

If you are trying to debug Ruby code in RubyMine 2 IDE, but are having difficulties such as, the IDE freezes after you try to step in, step over, or step next and are wondering if your configuration is wrong? It is not, if you happen to have installed the ruby-debug-ide19 gem from the command line (not from IDE), you need to patch the actual gem code to get things working nicely.

  • Open the following file with your favorite text editor (part of ruby ruby-debug-ide19 gem)
$GEM_HOME/ruby-debug-ide19-0.4.12/lib/ruby-debug/command.rb
  • Add the following code at line \~120 (look below for full code location):
return "" if str == "$FILENAME"
  • After the modifications, the code should look like:
def debug_eval(str, b = get_binding)
begin str = str.to_s
return "" if str == "$FILENAME"
max_time = 10

Thats it, you should be able to debug your Rails/Ruby code in RubyMine without issues.

comments powered by Disqus