Debugger not stopping at breakpoints

Hi all,

I have been developing Ruby programs for years and have been quite happy with the command line (vi + emacs for debugging) until now.  A colleague notified me of the recent 75% JetBrains sale so I thought it was worth giving RubyMine a shot.  I am starting to regret it
I am having an unbelievably frustrating time trying to get the RubyMine debugger to work - it refuses to stop at breakpoints.  I have spent several hours trying to fix it, including the advice from similar posts on this forum (namely ensure ruby-debug is not installed).

I am using RubyMine 4.5.4 via JDK 1.6.0_37 on Fedora 17

Ruby version is:
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]

Gem list:
archive-tar-minitar (0.5.2)
bigdecimal (1.1.0)
columnize (0.3.6)
i18n (0.6.1)
io-console (0.3)
json (1.6.5)
linecache19 (0.5.13)
mail (2.5.2)
mime-types (1.19)
polyglot (0.3.3)
rake (10.0.3)
rbx-require-relative (0.0.9)
rdoc (3.12)
ruby-debug-base19x (0.11.30.pre10)
ruby-debug-ide (0.4.17.beta14)
ruby_core_source (0.1.5)
taskjuggler (3.3.0)
term-ansicolor (1.0.7)
treetop (1.4.12)

The problems started yesterday - on first attempting to run the debugger I encountered several failures trying to build the binary dependencies.  I worked through these by manually installing the gems from the command line and holding the hand of each through the installation.  On completion of this, I was then able to run the debugger in the IDE but the debugger does not stop at breakpoints.   I have cleaned out and reinstalled everything several times (RubyMine, ruby, .RubyMine in $HOME .idea in project directory) but it doesn't seem to help.

The command line that is getting run from the IDE is the following:
/home/matt/.gem/ruby/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/bin/rdebug-ide --dispatcher-port 60036 --port 34557 -- /home/matt/bin/ruby/findgrep.rb

When this is run from the command line it seems to behave as expected - it boots up then waits for connections.

Howevver on running from the IDE it runs straight through, with the process exiting as follows:
/usr/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/matt/.gem/ruby/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/bin/rdebug-ide --dispatcher-port 55898 --port 42243 -- /home/matt/bin/ruby/findgrep.rb
Usage: /home/matt/bin/ruby/findgrep.rb [options] regexp filespec
Fast Debugger (ruby-debug-ide 0.4.17.beta14, ruby-debug-base 0.11.30.pre10) listens on

Process finished with exit code 0

Not sure if it's relevant but my programs Usage line (which has a break point on it) appears in the log before the Fast Debugger boot up message - I am wondering if it's some kind of process synchronisation issue

Any help that you can offer with this is gratefully appreciated - otherwise it's back to emacs for me

Kind regards,

Comment actions Permalink

I've just set the debugger to verbose output and get the following:

/usr/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/matt/.gem/ruby/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/bin/rdebug-ide --debug --port 57460 -- /home/matt/bin/ruby/findgrep.rb
Usage: /home/matt/bin/ruby/findgrep.rb [options] regexp filespec
Fast Debugger (ruby-debug-ide 0.4.17.beta14, ruby-debug-base 0.11.30.pre10) listens on
Connected from
6093: Starting control thread
6093: Processing in control: b /home/matt/bin/ruby/findgrep.rb:59
6093: <breakpointAdded no="1" location="/home/matt/bin/ruby/findgrep.rb:59"/>
6093: Processing in control: b /home/matt/bin/ruby/findgrep.rb:41
6093: <breakpointAdded no="2" location="/home/matt/bin/ruby/findgrep.rb:41"/>
6093: Processing in control: start
6093: Starting: running program script

Process finished with exit code 0

so it is certainly aware of the breakpoints - however, it does look like the program has finished before the debugger has started

EDIT: It's not a timing thing, I put a sleep 10 at the start of the program to be 100% sure the debugger was fired up by the time the breakpoint was hit and the result is the same - it now kinda looks like the debugger thread/process and the program thread/process are totally unconnected.  Are there any settings to control this? I've played around with what settings there are but nothing seems to affect this

EDIT2: Nmap indicates the debug port (57460 in the example above) remains open for the time the program is running then closes, suggesting that the the two processes are indeed actually connected - so it's simply not hitting the breakpoints.  I really never thought I'd say this, but using emacs for debugging is really simple to configure in comparison

Comment actions Permalink

As usual, my suggestion is a wee bit tangential.  I have been once more having the RM not-stopping problem.  Tried a fresh, new project to prove to myself that it's possible for breakpoints to work correctly.  Reprised the several variations of the gem install/uninstall dance. No joy.

Looked in vain for a recommended setup or best practices article. (hint)

Finally remembered that I'd moved my workspace a couple weeks ago and that I put a symlink in its old location.  Breakpoints and symbolic links are a bad combination.  FWIW.


Please sign in to leave a comment.