Define remote debugging port

Hi,

when debugging a remote rails application RubyMine automatically launches the debugger command like this:

/usr/local/bin/ruby -e 'at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)' /root/.gem/ruby/2.2.3/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide --disable-int-handler --evaluation-timeout 10 --rubymine-protocol-extensions --port 51957 --dispatcher-port 54735 -- /var/www/app/bin/rails server -b 0.0.0.0 -p 3000 -e development


The problem is, that in our setup the rails applications runs in a docker container inside a vagrant machine. Therefore i have to pass the debugger port to the vagrant machine to be connectable for RubyMine. But this port is not configurable, not even a port range. So i would have to expose all ports from 30000 - 65535 (which seems to be the range chosen by RubyMine) to the vagrant machine. Due to the way docker exposes ports to the host this leads to a memory problem for huge port ranges.

After reading in this board i tried it with a execute before command, but since the debugger whaits for a connection this doesn't work either.

Currently i added a remote debugging configuration and execute the rails command manually via SSH which works but is not so nice.

Is there a way to specify the port or port range?
1 comment
Comment actions Permalink

We've already discussed it in the ticket, so I'll just repeat the answer here: if you need to debug your app on the remote machine (in Docker), in that case the more appropriate way is to use Ruby remote debug configuration and there you can specify necessary ports (while in the standard Rails run configuration you, indeed, cannot). 

0

Please sign in to leave a comment.