0

I'm following the instructions listed in the Remote debugging article published by JetBrains to debug a remote Rails application using RubyMine.

Based on the instructions, I'm supposed to run

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

on the remote host. Running the above command throws the following error message stating that option -b is invalid.

-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 version 2017.1
  • Remote Host OS: Centos-6.9
  • Ruby version: 2.3.1p112

Could you please help me to understand what's going wrong? Thank you.

1 Answer 1

2

It looks like the command you are using is incorrect. It should be:

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

You have a missing double dash before bin/rails.

The error says the b option is not valid for the rdebug-ide command. However, the b option is intended for the bin/rails s command.

Sign up to request clarification or add additional context in comments.

4 Comments

Doesn't work with the dash as well. Same error "invalid option: -b".
I tried with double dash. It's trying to load a file in the current directory when the local debugger connects to it and it fails. -bash-4.1$ rdebug-ide --port 1236 --dispatcher-port 26166 --host 0.0.0.0 ? -- bin/rails s -b 0.0.0.0 Fast Debugger (ruby-debug-ide 0.6.1.beta4, debase 0.2.1, file filtering is supported) listens on 0.0.0.0:1236 Uncaught exception: cannot load such file -- Could you please let me know on what it's expecting? Pardon my ignorance as I'm new to Rails. Thank you.
Can you supply the exception details please?
Should there be a "?" also before the double dash? If I ignore the "?", I'm still getting the same error (invalid option -b). But if I use following command rdebug-ide --port 1236 --dispatcher-port 26166 --host 0.0.0.0 ? -- bin/rails s -b 0.0.0.0 it starts up but when the debugger connects, it throws the exception Uncaught exception: cannot load such file -- /vagrant/abc/webservices/xyz/? /var/imno/external/bin/rdebug-ide:23:in load' /var/mno/external/bin/rdebug-ide:23:in <main>' I guess it's trying to load some file from the current directory and it's failing

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.