Skip to content

Commit a855990

Browse files
committed
Move rdbg help to rdbg section
1 parent c91de31 commit a855990

File tree

2 files changed

+70
-66
lines changed

2 files changed

+70
-66
lines changed

README.md

Lines changed: 62 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,68 @@ Examples:
121121
> **Note**
122122
> If you want to use bundler (`bundle` command), you need to write `gem debug` line in your `Gemfile`.
123123
124+
<details><summary>Expand to see all options 👇</summary>
125+
126+
```
127+
exe/rdbg [options] -- [debuggee options]
128+
129+
Debug console mode:
130+
-n, --nonstop Do not stop at the beginning of the script.
131+
-e DEBUG_COMMAND Execute debug command at the beginning of the script.
132+
-x, --init-script=FILE Execute debug command in the FILE.
133+
--no-rc Ignore ~/.rdbgrc
134+
--no-color Disable colorize
135+
--no-sigint-hook Disable to trap SIGINT
136+
-c, --command Enable command mode.
137+
The first argument should be a command name in $PATH.
138+
Example: 'rdbg -c bundle exec rake test'
139+
140+
-O, --open=[FRONTEND] Start remote debugging with opening the network port.
141+
If TCP/IP options are not given, a UNIX domain socket will be used.
142+
If FRONTEND is given, prepare for the FRONTEND.
143+
Now rdbg, vscode and chrome is supported.
144+
--sock-path=SOCK_PATH UNIX Domain socket path
145+
--port=PORT Listening TCP/IP port
146+
--host=HOST Listening TCP/IP host
147+
--cookie=COOKIE Set a cookie for connection
148+
149+
Debug console mode runs Ruby program with the debug console.
150+
151+
'rdbg target.rb foo bar' starts like 'ruby target.rb foo bar'.
152+
'rdbg -- -r foo -e bar' starts like 'ruby -r foo -e bar'.
153+
'rdbg -c rake test' starts like 'rake test'.
154+
'rdbg -c -- rake test -t' starts like 'rake test -t'.
155+
'rdbg -c bundle exec rake test' starts like 'bundle exec rake test'.
156+
'rdbg -O target.rb foo bar' starts and accepts attaching with UNIX domain socket.
157+
'rdbg -O --port 1234 target.rb foo bar' starts accepts attaching with TCP/IP localhost:1234.
158+
'rdbg -O --port 1234 -- -r foo -e bar' starts accepts attaching with TCP/IP localhost:1234.
159+
'rdbg target.rb -O chrome --port 1234' starts and accepts connecting from Chrome Devtools with localhost:1234.
160+
161+
Attach mode:
162+
-A, --attach Attach to debuggee process.
163+
164+
Attach mode attaches the remote debug console to the debuggee process.
165+
166+
'rdbg -A' tries to connect via UNIX domain socket.
167+
If there are multiple processes are waiting for the
168+
debugger connection, list possible debuggee names.
169+
'rdbg -A path' tries to connect via UNIX domain socket with given path name.
170+
'rdbg -A port' tries to connect to localhost:port via TCP/IP.
171+
'rdbg -A host port' tries to connect to host:port via TCP/IP.
172+
173+
Other options:
174+
-h, --help Print help
175+
--util=NAME Utility mode (used by tools)
176+
--stop-at-load Stop immediately when the debugging feature is loaded.
177+
178+
NOTE
179+
All messages communicated between a debugger and a debuggee are *NOT* encrypted.
180+
Please use the remote debugging feature carefully.
181+
182+
```
183+
184+
</details>
185+
124186
## Set breakpoints
125187

126188
### The `binding.break` method
@@ -432,66 +494,6 @@ Here's a [Google sheet](https://docs.google.com/spreadsheets/d/1TlmmUDsvwK4sSIyo
432494
433495
See the [configuration guide](/docs/configuration.md) for more information.
434496
435-
## rdbg command help
436-
437-
```
438-
exe/rdbg [options] -- [debuggee options]
439-
440-
Debug console mode:
441-
-n, --nonstop Do not stop at the beginning of the script.
442-
-e DEBUG_COMMAND Execute debug command at the beginning of the script.
443-
-x, --init-script=FILE Execute debug command in the FILE.
444-
--no-rc Ignore ~/.rdbgrc
445-
--no-color Disable colorize
446-
--no-sigint-hook Disable to trap SIGINT
447-
-c, --command Enable command mode.
448-
The first argument should be a command name in $PATH.
449-
Example: 'rdbg -c bundle exec rake test'
450-
451-
-O, --open=[FRONTEND] Start remote debugging with opening the network port.
452-
If TCP/IP options are not given, a UNIX domain socket will be used.
453-
If FRONTEND is given, prepare for the FRONTEND.
454-
Now rdbg, vscode and chrome is supported.
455-
--sock-path=SOCK_PATH UNIX Domain socket path
456-
--port=PORT Listening TCP/IP port
457-
--host=HOST Listening TCP/IP host
458-
--cookie=COOKIE Set a cookie for connection
459-
460-
Debug console mode runs Ruby program with the debug console.
461-
462-
'rdbg target.rb foo bar' starts like 'ruby target.rb foo bar'.
463-
'rdbg -- -r foo -e bar' starts like 'ruby -r foo -e bar'.
464-
'rdbg -c rake test' starts like 'rake test'.
465-
'rdbg -c -- rake test -t' starts like 'rake test -t'.
466-
'rdbg -c bundle exec rake test' starts like 'bundle exec rake test'.
467-
'rdbg -O target.rb foo bar' starts and accepts attaching with UNIX domain socket.
468-
'rdbg -O --port 1234 target.rb foo bar' starts accepts attaching with TCP/IP localhost:1234.
469-
'rdbg -O --port 1234 -- -r foo -e bar' starts accepts attaching with TCP/IP localhost:1234.
470-
'rdbg target.rb -O chrome --port 1234' starts and accepts connecting from Chrome Devtools with localhost:1234.
471-
472-
Attach mode:
473-
-A, --attach Attach to debuggee process.
474-
475-
Attach mode attaches the remote debug console to the debuggee process.
476-
477-
'rdbg -A' tries to connect via UNIX domain socket.
478-
If there are multiple processes are waiting for the
479-
debugger connection, list possible debuggee names.
480-
'rdbg -A path' tries to connect via UNIX domain socket with given path name.
481-
'rdbg -A port' tries to connect to localhost:port via TCP/IP.
482-
'rdbg -A host port' tries to connect to host:port via TCP/IP.
483-
484-
Other options:
485-
-h, --help Print help
486-
--util=NAME Utility mode (used by tools)
487-
--stop-at-load Stop immediately when the debugging feature is loaded.
488-
489-
NOTE
490-
All messages communicated between a debugger and a debuggee are *NOT* encrypted.
491-
Please use the remote debugging feature carefully.
492-
493-
```
494-
495497
# Contributing
496498
497499
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/debug.

misc/README.md.erb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,14 @@ Examples:
121121
> **Note**
122122
> If you want to use bundler (`bundle` command), you need to write `gem debug` line in your `Gemfile`.
123123

124+
<details><summary>Expand to see all options 👇</summary>
125+
126+
```
127+
<%= `exe/rdbg --help` %>
128+
```
129+
130+
</details>
131+
124132
## Set breakpoints
125133

126134
### The `binding.break` method
@@ -215,12 +223,6 @@ Here's a [Google sheet](https://docs.google.com/spreadsheets/d/1TlmmUDsvwK4sSIyo
215223

216224
See the [configuration guide](/docs/configuration.md) for more information.
217225

218-
## rdbg command help
219-
220-
```
221-
<%= `exe/rdbg --help` %>
222-
```
223-
224226
# Contributing
225227

226228
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/debug.

0 commit comments

Comments
 (0)