blue64.net

Living in a 64 bit world

Archive for the ‘Ruby’ tag

RubyMine 2 Debugging Issue Resolved

without comments

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.

  1. Open the following file with your favorite text editor (part of ruby-debug-ide19 gem)
  2. $GEM_HOME/ruby-debug-ide19-0.4.12/lib/ruby-debug/command.rb
  3. Add the following code at line ~120 (look below for full code location):
  4. return "" if str == "$FILENAME"
  5. After the modifications, the code should look like:
  6.         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.

This entry was posted by Steve on Saturday, January 23rd, 2010 at 3:27 pm and is filed under: , , . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.