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 127.0.0.1:59401

 at org.rubyforge.debugcommons.RubyDebuggerProxy.a(RubyDebuggerProxy.java:647)
 at org.rubyforge.debugcommons.RubyDebuggerProxy.d(RubyDebuggerProxy.java:619)
 at org.rubyforge.debugcommons.RubyDebuggerProxy.getCommandSocket(RubyDebuggerProxy.java:381)
 at org.rubyforge.debugcommons.RubyDebuggerProxy.b(RubyDebuggerProxy.java:151)
 at org.rubyforge.debugcommons.RubyDebuggerProxy.attach(RubyDebuggerProxy.java:112)
 at org.jetbrains.plugins.ruby.ruby.debugger.impl.RubyDebugProcess$2.run(RubyDebugProcess.java:143)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:469)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:288)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:218)
 at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:169)
 at com.intellij.openapi.application.impl.ApplicationImpl$8$1.run(ApplicationImpl.java:684)
 at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:457)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:680)
 at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:148)
Caused by: java.net.ConnectException: Connection refused
 at java.net.PlainSocketImpl.$$YJP$$socketConnect(Native Method)
 at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java)
 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
 at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
 at java.net.Socket.connect(Socket.java:529)
 at java.net.Socket.connect(Socket.java:478)
 at java.net.Socket.<init>(Socket.java:375)
 at java.net.Socket.<init>(Socket.java:189)
 at org.rubyforge.debugcommons.RubyDebuggerProxy.d(RubyDebuggerProxy.java:610)
 ... 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 (3.3.10.4 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 (0.9.2.2)
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 (1.11.3.3)
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)
5 comments
Comment actions Permalink

Hello Andrew,

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

0
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.

Andy

0
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 127.0.0.1 for connecting, but due to unknown reason if computer name is not specified connection fails on OS X.

0
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.

0
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?

0

Please sign in to leave a comment.