One of the new features of RubyMine 1.0.5, released yesterday, is remote debugging support. Here’s a small guide for using this feature:
- Create new remote debug run configuration.

- Specify remote host and remote port to connect to. Ensure your firewall doesn’t block connections at given port.
- Specify Remote root folder and Local root folder options.These options will be used for sources mapping on remote and local machines. If root folders selected are incorrect, the debugger will connect but no breakpoints will be reached.
- Run rdebug-ide –port SELECTED_PORT — SCRIPT on the server side
We are ready to start. Launch created remote debug run configuration and explore what’s happening on the remote machine!
-JetBrains RubyMine Team

Is there an easy way to debug out of process rake tasks? I’d like to debug tests as they run through rake, since sometimes there’s different execution behavior than there is in RubyMine.
Hello Kevin,
When you run rake task inside RubyMine it creates correspoding run configuration, so you should go to run configurations editor, save it and debug.
Hope this helps
Pingback: JetBrains RubyMine Blog » Blog Archive » RubyMine 1.1 RC
I tried this – but when I run the configuration, rdebug-ide exits and displays the following ‘Uncaught exception: no such file to load — $
‘. I am literally typing in the command shown by the IDE which is ‘rdebug-ide –port 1234 — $SCRIPT$’.
Can anyone help with this please ?
Many Thanks
Gary
Hello Gary,
Please replace $SCRIPT$ to path of the script you want to debug.
What about this error? Any thoughts?
#1 – I don’t have rdebug-ide, just rdebug. No gems appear available
#2 – when I execute this:
$ rdebug –port 9000 — source_tree
ruby: Is a directory – /home//source_tree (Errno::EISDIR)
Thoughts?
Hi Dave,
Rdebug-ide gem is required fom debugging within RubyMine.
Please use for installation:
gem install ruby-debug-ide
The latest argument should be your script you want do debug remotely.
Just a tip for anyone looking for it.
If you can’t seem to be able to connect to the remote server (10 sec thingie)
just add -host 0.0.0.0 to the command that will make the rdebug-ide listen to request from all machines.
Suppose my tests are running on Hudson, would it be possible to debug in that instance, pausing a test would consequently pause a Hudson job right? Can this be done?
Yes, that should work
So would I just need to ensure that when the job is building it just runs the rdebug -p 9000 –$SCRIPT$ command?
Hi
Sorry to post again, I am just trialling this Remote Debugging on a colleagues machine for now. Here are the steps I am using:
1. On colleagues machine, server:
rdebug-ide -p 1234 — bundle exec cucumber — features/test.feature -h 0.0.0.0
2. My debug configuration is set to his IP address, and port 1234.
The folders for both of us are set at the base of our project.
When I run debug with one breakpoint, I just receive the 10 second timeout.
Is there anything else you can suggest? I dont think this is firewall related as I can ping his machine.
Bundle exec uses Kernel.exec internally to start new application (in this case cucumber), currently this is not supported (see issue). We’re currently working on that issue, as a workaround you can try to simply run cucumber script, that should work.
When you say run cucumber script, you mean create a script that has the command line to run cucumber?
I see in the logs, that you cant actually pass cucumber before the file path, else you receive this:
Uncaught exception: no such file to load — /features/cucumber
Don’t worry guys I managed to get this working, a bit of a hack by first using the path to my cucumber then putting the feature file thereafter.
Maybe when you fix the Kernel.exec issue, it might be worth allowing a command to run the script to be specified in the Edit Configuration dialog.
So you could say Run using: cucumber
Or any other tool, rake, bundle exec, rspec
Would be quite handy.
Anyway, thanks for your help.
When running on localhost the test will stop on the breakpoints. But when running on a colleagues machine, it doesn’t stop on the breakpoints. Is this an issue? I’ve seen some posts on breakpoints not being hit for rspec, would that issue likely affect cucumber?
I put breakpoints in the step definitions and the ruby files, but none were caught.
Is there anything I can do to ensure it hits the breakpoints?
hi oleg, I am unclear to what is the SCRIPT variable:
is it a file/ a dir? is it the command used to run the app on the server ?
rdebug-ide –port 8888 script/server staging (on rails 2.3)
does it have to do wheter i’m using passenger on my remote server?
please clarify, i think the documentation on this subject is lacking.
thanks.