RubyMine 7.1.0 Help

Remote Debugging

RubyMine provides the possibility of remote debugging for Ruby and Rails applications, using the dedicated Ruby remote debug configuration. So doing, RubyMine keeps mapping between the local sources, and the sources on the server side.
Several debug processes can be launched simultaneously. So doing, each remote debug process starts in a separate tab in the Debug tool window, with the name Remote debug for <script name>. You can work with each debugging session as usual.

To debug an application remotely, follow these general steps

  1. Perform preliminary steps:
    • If necessary, create or edit Ruby remote debug configuration. Specify the remote host, and port number; define local and remote root folders.
    • Make sure the required breakpoints are set.
  2. Launch the debug server. To do that, type the following command on the server side:
    rdebug-ide --port <port number> -- $COMMAND$
    and then press Enter. Here <port number> is taken from the Port field of the Ruby remote debug configuration dialog box, and $COMMAND$ is the name of the script or application we debug.

    For example, to remotely debug a Rails application, run the following command on the remote host:

    rdebug-ide --port 1234 --dispatcher-port 26162 -- bin/rails s

    Also make sure that the gem ruby-debug-ide is bundled to the project.

  3. In RubyMine, select the desired Ruby remote debug configuration, open Ruby script in the editor, and click debug on the main toolbar.

See Also

Last modified: 17 April 2015