繁体   English   中英

使用RubyMine远程调试Rails应用程序

[英]Remote debugging Rails application using RubyMine

我正在遵循JetBrains发布的“ 远程调试”文章中列出的说明,以使用RubyMine调试远程Rails应用程序。

根据指示,我应该跑步

rdebug-ide --port 1236 --dispatcher-port 26166 --host 0.0.0.0 ? bin/rails s -b 0.0.0.0

在远程主机上。 运行上面的命令将引发以下错误消息,指出选项-b无效。

-bash-4.1$ rdebug-ide --port 1236 --dispatcher-port 26166 --host 0.0.0.0  bin/rails s -b 0.0.0.0 
    Using ruby-debug-base 0.2.1 Usage: rdebug-ide is supposed to be called from RDT, NetBeans, RubyMine, or
               the IntelliJ IDEA Ruby plugin.  The command line interface to
               ruby-debug is rdebug.

        Options:
            -h, --host HOST                  Host name used for remote 

debugging
        -p, --port PORT                  Port used for remote debugging
            --dispatcher-port PORT       Port used for multi-process debugging dispatcher
            --evaluation-timeout TIMEOUT evaluation timeout in seconds (default: 10)
            --stop                       stop when the script is loaded
        -x, --trace                      turn on line tracing
        -l, --load-mode                  load mode (experimental)
        -d, --debug                      Debug self - prints information for debugging ruby-debug itself
            --xml-debug                  Debug self - sends information <message>s for debugging ruby-debug itself
        -I, --include PATH               Add PATH to $LOAD_PATH
            --attach-mode                Tells that rdebug-ide is working in attach mode
            --keep-frame-binding         Keep frame bindings
            --disable-int-handler        Disables interrupt signal handler
            --rubymine-protocol-extensions
                                         Enable all RubyMine-specific incompatible protocol extensions
            --catchpoint-deleted-event   Enable chatchpointDeleted event
            --value-as-nested-element    Allow to pass variable's value as nested element instead of attribute

    Common options:
        -v, --version                    Show version

    invalid option: -b
  • RubyMine版本2017.1
  • 远程主机操作系统:Centos-6.9
  • Ruby版本:2.3.1p112

您能帮我了解发生了什么事吗? 谢谢。

您所使用的命令似乎不正确。 它应该是:

rdebug-ide --port 1236 --dispatcher-port 26166 --host 0.0.0.0 -- bin/rails s -b 0.0.0.0

您在箱/导轨前缺少双破折号。

该错误表明b选项对于rdebug-ide命令无效。 但是,b选项用于bin / rails的命令。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM