Debugger DOA on OS X Lion

I've jumped through every hoop imaginable but end up right back at the same spot.

No matter what I try, trying to debug in RubyMine 4 (and up to latest EAP 118-533) simply presents the "Wating for debugger to connect" modal dialog and it simply does NOT connect. I've tried installing the latest gems from RubyForge (linecache 0.5.13, ruby-debug-base19 0.11.26 and ruby-debug19 0.11.6) to no avail.  RubyMine installs ruby-debug-ide and ruby-debug-ide19 and then just sits there, doing nothing.  

I gotta say... I love Jetbrains RubyMine and IDEA, but EVERY TIME there's an upgrade to either RubyMine or some core component of Ruby/Rails, the debugger dies a terrible death and I waste hours, if not days, tracking down pure hack "fixes".  Either that, or I have to move to a different dev environment completely.  There's gotta be a better way.  The core debug gems RM depends upon aren't really being maintained.  There's the newer "debugger" gem but that has no ide component yet.  What can we do to help sort this out?

Below is the output from the idea.log and the list of gems (using RVM latest head with Ruby 1.9.3).  I'd be happy to send along anything else.

2012-06-03 14:58:10,727 [1660076]   INFO - debugger.impl.RubyDebugProcess - Couldn't connect to debugger:  
org.rubyforge.debugcommons.RubyDebuggerException: Cannot connect to the debugged process at port 59401 in 10s:

Dumping and destroying process, when the debuggee process is running. You might try to increase the timeout. Killing...

Error Output:
Fast Debugger (ruby-debug-ide 0.4.17.beta9, ruby-debug-base 0.11.30.pre10) listens on

 at org.rubyforge.debugcommons.RubyDebuggerProxy.a(
 at org.rubyforge.debugcommons.RubyDebuggerProxy.d(
 at org.rubyforge.debugcommons.RubyDebuggerProxy.getCommandSocket(
 at org.rubyforge.debugcommons.RubyDebuggerProxy.b(
 at org.rubyforge.debugcommons.RubyDebuggerProxy.attach(
 at org.jetbrains.plugins.ruby.ruby.debugger.impl.RubyDebugProcess$
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(
 at com.intellij.openapi.application.impl.ApplicationImpl$8$
 at com.intellij.openapi.application.impl.ApplicationImpl$
 at java.util.concurrent.Executors$
 at java.util.concurrent.FutureTask$Sync.innerRun(
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
 at java.util.concurrent.ThreadPoolExecutor$
 at com.intellij.openapi.application.impl.ApplicationImpl$1$
Caused by: Connection refused
 at$$YJP$$socketConnect(Native Method)
 at org.rubyforge.debugcommons.RubyDebuggerProxy.d(
 ... 18 more

*** LOCAL GEMS ***

actionmailer (3.2.3)
actionpack (3.2.3)
active_scaffold (3.2.11)
activemodel (3.2.3)
activerecord (3.2.3)
activeresource (3.2.3)
activesupport (3.2.3)
acts-as-taggable-on (2.2.2)
archive-tar-minitar (0.5.2)
arel (3.0.2)
builder (3.0.0)
bundler (1.1.4)
capistrano (2.12.0)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.3.3)
columnize (0.3.6)
erubis (2.7.0)
execjs (1.4.0)
highline (1.6.12)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.3)
jquery-rails (2.0.2)
json (1.7.3)
libv8 ( x86_64-darwin-11)
linecache19 (0.5.13, 0.5.12)
mail (2.4.4)
mime-types (1.18)
multi_json (1.3.6)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.5.2)
net-ssh-gateway (1.1.0)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.3)
railties (3.2.3)
rake (
rdoc (3.12)
ruby-debug-base19x (0.11.30.pre10)
ruby-debug-ide (0.4.17.beta9)
ruby_core_source (0.1.5)
rubygems-bundler (1.0.2)
rvm (
sass (3.1.19)
sass-rails (3.2.5)
sprockets (2.1.3)
sqlite3 (1.3.6)
therubyracer (0.10.1)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
uglifier (1.2.4)
Comment actions Permalink

Hello Andrew,

do you have exceptional breakpoints? Please try removing them before launching application as a workaround

Comment actions Permalink

I'm not using any breakpoints at all.

Also, I've tried starting the debugger with three different Rails projects, all needing their own ruby interpreter and gem setup which I've been handling with RVM.  I've uninstalled and reinstalled RVM, ruby 1.8.7, ruby 1.9.2, ruby 1.9.3, and any and all gems, multiple times.  I've also tried with the native ruby setup on OSX Lion.  The behavior is the same in RubyMine regardless. The "waiting to connect to debugger" dialog pops up, then quits out saying it couldn't connect.  When debugging WAS working off in the remote past, I rarely ever glimpsed that dialog.


Comment actions Permalink

If the problem is reproducible on both 1.8.7 and 1.9.x interpreters, then it must be some connection issue not related to gems. Please check that firewall isn't blocking connections from RubyMine or ruby itself. Also please check that you have Computer Name specified in your System Preferences | Sharing. We use for connecting, but due to unknown reason if computer name is not specified connection fails on OS X.

Comment actions Permalink

Shazam! That nailed it!

No idea WHY, but my computer name was a blank in the System Preferences | Sharing pane.  Named it "Debugnowpleaseplease" and the debugger fired right up.

Fantastic! Many thanks Dennis.

Man, I hate these kinds of issues... Hours wasted with a tiny, simple, but way off to one side fix.  Like making sure the screen door to the backyard is closed whenever you take a shower on the third floor or there won't be any hot water...

Maybe this bizarre piece of info should get tucked away somewhere visible for users so the next poor nitwit like me won't have to stumble on this thread? Or maybe the debug setup in RubyMine could check for a missing computer name on OSX?  Or the info might apper in the same "debugger failed to connet" dialog suggesting the user increase the timeout on OS X?

Regardless, thanks again.

Comment actions Permalink

This was it for me too. Caused an unreasonable amount of stress trying to figure out why one machine could debug and the other couldn't. Plus the complete lack of a any error output wasn't helping.

This was occuring for me in RubyMine 4.5 AND 5.0.

So why hasn't a simple check been added to the IDE for this issue?


Please sign in to leave a comment.