OS Manuals

/usr/bin/rdbg

the Ruby programming language

From ruby-3.2 3.2.11-r9 (os), captured 2026-11-05 by running rdbg --help (exit 0). permalink

/usr/bin/rdbg [options] -- [debuggee options]

Debug console mode:
    -n, --nonstop                    Do not stop at the beginning of the script.
    -e DEBUG_COMMAND                 Execute debug command at the beginning of the script.
    -x, --init-script=FILE           Execute debug command in the FILE.
        --no-rc                      Ignore ~/.rdbgrc
        --no-color                   Disable colorize
        --no-sigint-hook             Disable to trap SIGINT
    -c, --command                    Enable command mode.
                                     The first argument should be a command name in $PATH.
                                     Example: 'rdbg -c bundle exec rake test'

    -O, --open=[FRONTEND]            Start remote debugging with opening the network port.
                                     If TCP/IP options are not given, a UNIX domain socket will be used.
                                     If FRONTEND is given, prepare for the FRONTEND.
                                     Now rdbg, vscode and chrome is supported.
        --sock-path=SOCK_PATH        UNIX Domain socket path
        --port=PORT                  Listening TCP/IP port
        --host=HOST                  Listening TCP/IP host
        --cookie=COOKIE              Set a cookie for connection

  Debug console mode runs Ruby program with the debug console.

  'rdbg target.rb foo bar'                starts like 'ruby target.rb foo bar'.
  'rdbg -- -r foo -e bar'                 starts like 'ruby -r foo -e bar'.
  'rdbg -c rake test'                     starts like 'rake test'.
  'rdbg -c -- rake test -t'               starts like 'rake test -t'.
  'rdbg -c bundle exec rake test'         starts like 'bundle exec rake test'.
  'rdbg -O target.rb foo bar'             starts and accepts attaching with UNIX domain socket.
  'rdbg -O --port 1234 target.rb foo bar' starts accepts attaching with TCP/IP localhost:1234.
  'rdbg -O --port 1234 -- -r foo -e bar'  starts accepts attaching with TCP/IP localhost:1234.
  'rdbg target.rb -O chrome --port 1234'  starts and accepts connecting from Chrome Devtools with localhost:1234.

Attach mode:
    -A, --attach                     Attach to debuggee process.

  Attach mode attaches the remote debug console to the debuggee process.

  'rdbg -A'           tries to connect via UNIX domain socket.
                      If there are multiple processes are waiting for the
                      debugger connection, list possible debuggee names.
  'rdbg -A path'      tries to connect via UNIX domain socket with given path name.
  'rdbg -A port'      tries to connect to localhost:port via TCP/IP.
  'rdbg -A host port' tries to connect to host:port via TCP/IP.

Other options:
    -h, --help                       Print help
        --util=NAME                  Utility mode (used by tools)
        --stop-at-load               Stop immediately when the debugging feature is loaded.

NOTE
  All messages communicated between a debugger and a debuggee are *NOT* encrypted.
  Please use the remote debugging feature carefully.
Options (16)
OptionDescriptionSource
-n, --nonstopDo not stop at the beginning of the script.help
-e DEBUG_COMMANDExecute debug command at the beginning of the script.help
-x, --init-script FILEExecute debug command in the FILE.help
--no-rcIgnore ~/.rdbgrchelp
--no-colorDisable colorizehelp
--no-sigint-hookDisable to trap SIGINThelp
-c, --commandEnable command mode.help
-O, --open FRONTENDStart remote debugging with opening the network port.help
--sock-path SOCK_PATHUNIX Domain socket pathhelp
--port PORTListening TCP/IP porthelp
--host HOSTListening TCP/IP hosthelp
--cookie COOKIESet a cookie for connectionhelp
-A, --attachAttach to debuggee process.help
-h, --helpPrint helphelp
--util NAMEUtility mode (used by tools)help
--stop-at-loadStop immediately when the debugging feature is loaded.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.