Debugging with remote interpreter behind a firewall.

I have RubyMine installation with remote interpreter configured (via SSH). Running specs, rake tasks, etc. works fine. But I could not debug since when I select Run -> Debug... it runs ruby-debug-ide on a random port. 

I can allow couple of ports on firewall or even some range of ports. But turning it off is not an option.

How can I specify port to use?

Please sign in to leave a comment.