Skip to content

Commit a6570c6

Browse files
committed
Remove prefix and add session_name
1 parent 5ce9b5e commit a6570c6

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

README.md

+13-15
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ New debug.rb has several advantages:
3131
# Installation
3232

3333
```
34-
$ gem install debug
34+
gem install debug
3535
```
3636

3737
or specify `-Ipath/to/debug/lib` in `RUBYOPT` or each ruby command-line option, especially for debug this gem development.
@@ -71,8 +71,8 @@ If you can modify the source code, you can use the debugger by adding `require '
7171

7272
You can also use its 2 aliases in the same way:
7373

74-
- `binding.b`
75-
- `debugger`
74+
* `binding.b`
75+
* `debugger`
7676

7777
After that, run the program as usual and you will enter the debug console at breakpoints you inserted.
7878

@@ -248,6 +248,7 @@ If you want to run a command written in Ruby like like `rake`, `rails`, `bundle`
248248
* With `-c` option, `rdbg -c <name>` means that `<name>` is command in `PATH` and simply invoke it with the debugger.
249249

250250
Examples:
251+
251252
* `rdbg -c -- rails server`
252253
* `rdbg -c -- bundle exec ruby foo.rb`
253254
* `rdbg -c -- bundle exec rake test`
@@ -335,7 +336,7 @@ If you want to use TCP/IP for the remote debugging, you need to specify the port
335336
To connect to the debuggee, you need to specify the port.
336337

337338
```shell
338-
$ rdbg --attach 12345
339+
rdbg --attach 12345
339340
```
340341

341342
If you want to choose the host to bind, you can use `--host` option.
@@ -353,15 +354,15 @@ Please use it carefully.
353354
By default, UNIX domain socket is used for the debugging port. To use TCP/IP, you can set the `RUBY_DEBUG_PORT` environment variable.
354355

355356
```shell
356-
$ RUBY_DEBUG_PORT=12345 ruby target.rb
357+
RUBY_DEBUG_PORT=12345 ruby target.rb
357358
```
358359

359360
### Integration with external debugger frontend
360361

361362
You can attach with external debugger frontend with VSCode and Chrome.
362363

363364
```
364-
$ rdbg --open=[frontend] target.rb
365+
rdbg --open=[frontend] target.rb
365366
```
366367

367368
will open a debug port and `[frontend]` can attach to the port.
@@ -464,8 +465,6 @@ config set log_level INFO
464465
config set no_color true
465466
```
466467

467-
468-
469468
* UI
470469
* `RUBY_DEBUG_LOG_LEVEL` (`log_level`): Log level same as Logger (default: WARN)
471470
* `RUBY_DEBUG_SHOW_SRC_LINES` (`show_src_lines`): Show n lines source code on breakpoint (default: 10)
@@ -502,7 +501,7 @@ config set no_color true
502501
* `RUBY_DEBUG_SOCK_PATH` (`sock_path`): UNIX Domain Socket remote debugging: socket path
503502
* `RUBY_DEBUG_SOCK_DIR` (`sock_dir`): UNIX Domain Socket remote debugging: socket directory
504503
* `RUBY_DEBUG_SOCK_PREFIX` (`sock_prefix`): UNIX Domain Socket remote debugging: socket prefix
505-
* `RUBY_DEBUG_SOCK_SUFFIX` (`sock_suffix`): UNIX Domain Socket remote debugging: socket suffix
504+
* `RUBY_DEBUG_SESSION_NAME` (`session_name`): UNIX Domain Socket remote debugging: session name
506505
* `RUBY_DEBUG_LOCAL_FS_MAP` (`local_fs_map`): Specify local fs map
507506
* `RUBY_DEBUG_SKIP_BP` (`skip_bp`): Skip breakpoints if no clients are attached (default: false)
508507
* `RUBY_DEBUG_COOKIE` (`cookie`): Cookie for negotiation
@@ -593,9 +592,9 @@ The `<...>` notation means the argument.
593592
* `b[reak] <file>:<line>` or `<file> <line>`
594593
* Set breakpoint on `<file>:<line>`.
595594
* `b[reak] <class>#<name>`
596-
* Set breakpoint on the method `<class>#<name>`.
595+
* Set breakpoint on the method `<class>#<name>`.
597596
* `b[reak] <expr>.<name>`
598-
* Set breakpoint on the method `<expr>.<name>`.
597+
* Set breakpoint on the method `<expr>.<name>`.
599598
* `b[reak] ... if: <expr>`
600599
* break if `<expr>` is true at specified location.
601600
* `b[reak] ... pre: <command>`
@@ -783,7 +782,6 @@ The `<...>` notation means the argument.
783782
* `h[elp] <command>`
784783
* Show help for the given command.
785784

786-
787785
## Debugger API
788786

789787
### Start debugging
@@ -925,12 +923,12 @@ NOTE
925923
926924
# Additional Resources
927925
928-
- [From byebug to ruby/debug](https://st0012.dev/from-byebug-to-ruby-debug) by Stan Lo - A migration guide for `byebug` users.
929-
- [ruby/debug cheatsheet](https://st0012.dev/ruby-debug-cheatsheet) by Stan Lo
926+
* [From byebug to ruby/debug](https://st0012.dev/from-byebug-to-ruby-debug) by Stan Lo - A migration guide for `byebug` users.
927+
* [ruby/debug cheatsheet](https://st0012.dev/ruby-debug-cheatsheet) by Stan Lo
930928
931929
# Contributing
932930
933-
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/debug.
931+
Bug reports and pull requests are welcome on GitHub at <https://github.com/ruby/debug>.
934932
This debugger is not mature so your feedback will help us.
935933
936934
Please also check the [contributing guideline](/CONTRIBUTING.md).

lib/debug/config.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ module DEBUGGER__
4646
host: ['RUBY_DEBUG_HOST', "REMOTE: TCP/IP remote debugging: host", :string, "127.0.0.1"],
4747
sock_path: ['RUBY_DEBUG_SOCK_PATH', "REMOTE: UNIX Domain Socket remote debugging: socket path"],
4848
sock_dir: ['RUBY_DEBUG_SOCK_DIR', "REMOTE: UNIX Domain Socket remote debugging: socket directory"],
49-
sock_suffix: ['RUBY_DEBUG_SOCK_SUFFIX', "REMOTE: UNIX Domain Socket remote debugging: socket suffix"],
5049
sock_prefix: ['RUBY_DEBUG_SOCK_PREFIX', "REMOTE: UNIX Domain Socket remote debugging: socket prefix"],
50+
session_name: ['RUBY_DEBUG_SESSION_NAME', "REMOTE: UNIX Domain Socket remote debugging: session name"],
5151
local_fs_map: ['RUBY_DEBUG_LOCAL_FS_MAP', "REMOTE: Specify local fs map", :path_map],
5252
skip_bp: ['RUBY_DEBUG_SKIP_BP', "REMOTE: Skip breakpoints if no clients are attached", :bool, 'false'],
5353
cookie: ['RUBY_DEBUG_COOKIE', "REMOTE: Cookie for negotiation"],

0 commit comments

Comments
 (0)