rubymine debug 80

来源:互联网 发布:二分法求根c语言程序 编辑:程序博客网 时间:2024/06/06 16:36

1. 远程监听

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 a script or an application remotely, follow these general steps

  1. Start remote debug session.

    The common format of the command to be run on the remote host is as follows:

    rdebug-ide --host 0.0.0.0 --port <port number> --dispatcher-port <port number> -- $COMMAND$

    You can see this command as a tip in the Ruby remote run/debug configuration dialog.

    Note that there is a difference between a Ruby script and a Rails application. For example, the command for a Ruby script will be:

    rdebug-ide--host0.0.0.0--port1234 --dispatcher-port26162 -/home/user/RubymineProjects/remote-debug-example/math_wiz.rb

    The command for a Rails application will be:

    rdebug-ide--port1236 --dispatcher-port26166 --host0.0.0.0- bin/railss -b0.0.0.0

    In both cases port is the port number on the remote host.dispatcher-port is the port number on the local host.

  2. Create local copy of the script or application to be debugged, and then set the required breakpoints.
  3. Create or edit Ruby remote debug configuration. For example,rm_remote_debug_run_configuration
  4. In RubyMine, select the desired Ruby remote debug configuration, open Ruby script or Rails application in the editor, and click debug on the main toolbar.

Note that a cancel button has been added to the Connecting to debugger progress bar, giving you the way to manually cancel remote debugging session, rather than waiting for a timeout.

See the detailed instructions in the tutorial.


2. 端口转发

rubymine debug 80端口

sudo ssh -t -L 80:127.0.0.1:8080 user@0.0.0.0


3. nginx 转发


0 0
原创粉丝点击