Skip to content

Instantly share code, notes, and snippets.

@slevine
Created January 23, 2010 20:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slevine/284778 to your computer and use it in GitHub Desktop.
Save slevine/284778 to your computer and use it in GitHub Desktop.
How to fix debugging issues in RubyMine 2.0.1 with Ruby 1.9.

If you are trying to debug Ruby code in RubyMine 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)

    $GEM_HOME/ruby-debug-ide19-0.4.12/lib/ruby-debug/command.rb
    
  2. Add the following code at line ~120 (look below for full code location):

    return "" if str == "$FILENAME"
    
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment