Most of the installation instructions for the ruby debugger that I found were out of date for Windows, so I thought it would be useful to document how I got it working.
- First, you should start with Ruby installed from the RubyInstaller. If you have any problems with getting debugging working, I would suggest installing Ruby fresh from here and trying again.
- Second, you need to install DevKit. Download DevKit from the RubyInstaller page, then follow the installation instructions on the Development Kit page. Their instructions are thorough, so I wonâ€™t reproduce them here. The DevKit install has changed recently and this was part of my problem getting the debugging gem installed.
- Install the ruby-debug-ide19 gem with the following command line.
gem install ruby-debug-ide19 â€“platform=ruby
- You should now be able to debug in RubyMine. When I started debugging in RubyMine, it prompted to install additional debugging gems. I allowed it and they installed fine and debugging started.
- Set a breakpoint by clicking in the gutter where you want the breakpoint
- Select your run/debug configuration in the toolbar and click on the Debug button
- Visit the page you want to debug in your browser. You should hit the breakpoint and see the callstack and the values of all the variables in scope.
- You should now be able to step through the code. See the RubyMine debugging documentation for more help.