RubyMine remote debug breakpoint not working for 2.4.7, but works for 2.5.7

Answered

Hi 

RubyMine 2020.1 remote debug works well with Rails app on 2.5.7, but it is not stopping at breakpoints for an App using 2.4.7 below are the versions of RubyMine, ruby-debug-ide and debase.If I pause randomly I do see the variables.

RubyMine 2020.1

bundle exec rdebug-ide --host 0.0.0.0 --port 1234 --keep-frame-binding -d -- bin/rails s
Fast Debugger (ruby-debug-ide 0.7.2, debase 0.2.4.1, file filtering is supported) listens on 0.0.0.0:1234

Thanks,

Prabhdeep

 

4 comments
Comment actions Permalink

Hello,

could you please specify what kind of remote SDK you're using? Is it Docker, Vagrant or SSH based one? Which files are you debugging (Ruby scripts, Rails server, templates)? Do you have experimental debugger option turned on (Help - Find Action - Experimental Features)?

0
Comment actions Permalink

Thanks for replying Olga, please find answers to your questions below:

 

1) Its a Docker image running on Kubernetes, I am using "kubectl port-forward" to forward port localhost:1234 to container on pod. This works for fine the https://github.com/JetBrains/sample_rails_app.git using Ruby-2.5.7. The breakpoints work fine for sample_app. But breakpoints do not work for the 2.4.7 App using Puma. Pausing works fine.

2) ruby.use.experimental.debugger is enabled

 

Thanks!

0
Comment actions Permalink

Also Olga, breakpoints works fine if I run rdebug-ide on the local machine, but on the remote Kubernetes machine it throws the following error. It does not throw this error if I omit the --despatcher-port 26162 argument.

Exception: Connection refused - connect(2) for "127.0.0.1" port 26162
/usr/local/bundle/ruby/2.4.0/gems/socksify-1.7.1/lib/socksify.rb:178:in `initialize'
/usr/local/bundle/ruby/2.4.0/gems/socksify-1.7.1/lib/socksify.rb:178:in `initialize'
/usr/local/bundle/ruby/2.4.0/gems/ruby-debug-ide-0.7.2/lib/ruby-debug-ide.rb:201:in `open'
/usr/local/bundle/ruby/2.4.0/gems/ruby-debug-ide-0.7.2/lib/ruby-debug-ide.rb:201:in `block in notify_dispatcher_if_needed'
/usr/local/bundle/ruby/2.4.0/gems/ruby-debug-ide-0.7.2/lib/ruby-debug-ide.rb:199:in `times'
/usr/local/bundle/ruby/2.4.0/gems/ruby-debug-ide-0.7.2/lib/ruby-debug-ide.rb:199:in `notify_dispatcher_if_needed'
/usr/local/bundle/ruby/2.4.0/gems/ruby-debug-ide-0.7.2/lib/ruby-debug-ide.rb:146:in `block in _start_control_common'


Backtrace:
/usr/local/bundle/ruby/2.4.0/gems/ruby-debug-ide-0.7.2/lib/ruby-debug-ide.rb:160:in `block in _start_control_common'

9241: Processing in control: detach
[9241] - Worker 0 (pid: 9451) booted, phase: 0

0
Comment actions Permalink

Phew! finally fixed, did the following to fix it:

  • disabled puma threads
  • removed byebug from Gemlock

Loving it! being a long time Eclipse/IntellJ Java/Python developer, RubyMine is the saving grace for developers like me in Ruby Env :)

0

Please sign in to leave a comment.