Skip to content

Commit 90084d8

Browse files
ahangarhako1
authored andcommitted
Minor punctuation and grammar fixes
1 parent 2bdb8f8 commit 90084d8

1 file changed

Lines changed: 30 additions & 30 deletions

File tree

README.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
This library provides debugging functionality to Ruby (MRI) 2.7 and later.
66

7-
This debug.rb is replacement of traditional lib/debug.rb standard library which is implemented by `set_trace_func`.
7+
This debug.rb is the replacement of traditional lib/debug.rb standard library, which is implemented by `set_trace_func`.
88
New debug.rb has several advantages:
99

1010
* Fast: No performance penalty on non-stepping mode and non-breakpoints.
@@ -18,7 +18,7 @@ New debug.rb has several advantages:
1818
Connection | UDS, TCP/IP | UDS, TCP/IP | TCP/IP |
1919
Requirement | No | [vscode-rdbg](https://marketplace.visualstudio.com/items?itemName=KoichiSasada.vscode-rdbg) | Chrome |
2020

21-
* Extensible: application can introduce debugging support with several ways:
21+
* Extensible: application can introduce debugging support in several ways:
2222
* By `rdbg` command
2323
* By loading libraries with `-r` command line option
2424
* By calling Ruby's method explicitly
@@ -55,7 +55,7 @@ To use a debugger, roughly you will do the following steps:
5555
4. Use debug commands.
5656
* [Evaluate Ruby expressions](#evaluate) (e.g. `p lvar` to see the local variable `lvar`).
5757
* [Query the program status](#information) (e.g. `info` to see information about the current frame).
58-
* [Control program flow](#control-flow) (e.g. move to the another line with `step`, to the next line with `next`).
58+
* [Control program flow](#control-flow) (e.g. move to another line with `step`, to the next line with `next`).
5959
* [Set another breakpoint](#breakpoint) (e.g. `catch Exception` to set a breakpoint that'll be triggered when `Exception` is raised).
6060
* [Activate tracing in your program](#trace) (e.g. `trace call` to trace method calls).
6161
* [Change the configuration](#configuration-1) (e.g. `config set no_color true` to disable coloring).
@@ -238,11 +238,11 @@ d => 4
238238
```
239239

240240
By the way, using `rdbg` command you can suspend your application with `C-c` (SIGINT) and enter the debug console.
241-
It will help that if you want to know what the program is doing.
241+
It will help if you want to know what the program is doing.
242242

243243
### Use `rdbg` with commands written in Ruby
244244

245-
If you want to run a command written in Ruby like like `rake`, `rails`, `bundle`, `rspec` and so on, you can use `rdbg -c` option.
245+
If you want to run a command written in Ruby like `rake`, `rails`, `bundle`, `rspec`, and so on, you can use `rdbg -c` option.
246246

247247
* Without `-c` option, `rdbg <name>` means that `<name>` is Ruby script and invoke it like `ruby <name>` with the debugger.
248248
* With `-c` option, `rdbg -c <name>` means that `<name>` is command in `PATH` and simply invoke it with the debugger.
@@ -265,8 +265,8 @@ Like other languages, you can use this debugger on the VSCode.
265265
2. Open `.rb` file (e.g. `target.rb`)
266266
3. Register breakpoints with "Toggle breakpoint" in Run menu (or type F9 key)
267267
4. Choose "Start debugging" in "Run" menu (or type F5 key)
268-
5. You will see a dialog "Debug command line" and you can choose your favorite command line your want to run.
269-
6. Chosen command line is invoked with `rdbg -c` and VSCode shows the details at breakpoints.
268+
5. You will see a dialog "Debug command line" and you can choose your favorite command line you want to run.
269+
6. Chosen command line is invoked with `rdbg -c`, and VSCode shows the details at breakpoints.
270270

271271
Please refer [Debugging in Visual Studio Code](https://code.visualstudio.com/docs/editor/debugging) for operations on VSCode.
272272

@@ -275,15 +275,15 @@ Please see the extension page for more details.
275275

276276
## Remote debugging
277277

278-
You can use this debugger as a remote debugger. For example, it will help the following situations:
278+
You can use this debugger as a remote debugger. For example, it will help in the following situations:
279279

280-
* Your application does not run on TTY and it is hard to use `binding.pry` or `binding.irb`.
281-
* Your application is running on Docker container and there is no TTY.
280+
* Your application does not run on TTY, and it is hard to use `binding.pry` or `binding.irb`.
281+
* Your application is running on a Docker container, and there is no TTY.
282282
* Your application is running as a daemon.
283283
* Your application uses pipe for STDIN or STDOUT.
284284
* Your application is running as a daemon and you want to query the running status (checking a backtrace and so on).
285285

286-
You can run your application as a remote debuggee and the remote debugger console can attach to the debuggee anytime.
286+
You can run your application as a remote debugged, and the remote debugger console can attach to the debuggee anytime.
287287

288288
### Invoke as a remote debuggee
289289

@@ -324,11 +324,11 @@ $ rdbg -A
324324
(rdbg:remote)
325325
```
326326

327-
If there is no other opening ports on the default directory, `rdbg --attach` command chooses the only one opening UNIX domain socket and connect to it. If there are more files, you need to specify the file.
327+
If there is no other opening ports on the default directory, `rdbg --attach` command chooses the only one opening UNIX domain socket and connects to it. If there are more files, you need to specify the file.
328328

329-
When `rdbg --attach` connects to the debuggee, you can use any debug commands (set breakpoints, continue the program and so on) like local debug console. When an debuggee program exits, the remote console will also terminate.
329+
When `rdbg --attach` connects to the debuggee, you can use any debug commands (set breakpoints, continue the program, and so on) like the local debug console. When a debuggee program exits, the remote console will also terminate.
330330

331-
NOTE: If you use `quit` command, only remote console exits and the debuggee program continues to run (and you can connect it again). If you want to exit the debuggee program, use `kill` command.
331+
NOTE: If you use `quit` command, only the remote console exits and the debuggee program continues to run (and you can connect it again). If you want to exit the debuggee program, use `kill` command.
332332

333333
If you want to use TCP/IP for the remote debugging, you need to specify the port and host with `--port` like `rdbg --open --port 12345` and it binds to `localhost:12345`.
334334

@@ -372,7 +372,7 @@ Also `open` command allows opening the debug port.
372372

373373
([vscode-rdbg v0.0.9](https://marketplace.visualstudio.com/items?itemName=KoichiSasada.vscode-rdbg) or later is required)
374374

375-
If you don't run a debuggee Ruby process on VSCode, you can attach with VSCode later with the following steps.
375+
If you don't run a debuggee Ruby process on VSCode, you can attach to VSCode later with the following steps.
376376

377377
`rdbg --open=vscode` opens the debug port and tries to invoke the VSCode (`code` command).
378378

@@ -425,7 +425,7 @@ If your application is running on a SSH remote host, please try:
425425
426426
```
427427

428-
and try to use proposed commands.
428+
and try to use the proposed commands.
429429

430430
Note that you can attach with `rdbg --attach` and continue REPL debugging.
431431

@@ -443,7 +443,7 @@ DEBUGGER: With Chrome browser, type the following URL in the address-bar:
443443
DEBUGGER: wait for debugger connection...
444444
```
445445

446-
Type `devtools://devtools/bundled/inspector.html?v8only=true&panel=sources&ws=127.0.0.1:57231/b32a55cd-2eb5-4c5c-87d8-b3dfc59d80ef` in the address-bar on Chrome browser, and you can continue the debugging with chrome browser.
446+
Type `devtools://devtools/bundled/inspector.html?v8only=true&panel=sources&ws=127.0.0.1:57231/b32a55cd-2eb5-4c5c-87d8-b3dfc59d80ef` in the address bar on Chrome browser, and you can continue the debugging with chrome browser.
447447

448448
Also `open chrome` command works like `open vscode`.
449449

@@ -456,7 +456,7 @@ When the debug session is started, initial scripts are loaded so you can put you
456456

457457
### Configuration list
458458

459-
You can configure debugger's behavior with environment variables and `config` command. Each configuration has environment variable and the name which can be specified by `config` command.
459+
You can configure the debugger's behavior with environment variables and `config` command. Each configuration has an environment variable and a name which can be specified by `config` command.
460460

461461
```
462462
# configuration example
@@ -515,7 +515,7 @@ There are other environment variables:
515515

516516
* `NO_COLOR`: If the value is set, set `RUBY_DEBUG_NO_COLOR` ([NO_COLOR: disabling ANSI color output in various Unix commands](https://no-color.org/)).
517517
* `RUBY_DEBUG_ENABLE`: If the value is `0`, do not enable debug.gem feature.
518-
* `RUBY_DEBUG_ADDED_RUBYOPT`: Remove this value from `RUBYOPT` at first. This feature helps loading debug.gem with `RUBYOPT='-r debug/...'` and you don't want to derive it to child processes. In this case you can set `RUBY_DEBUG_ADDED_RUBYOPT='-r debug/...'` (same value) and this string will be deleted from `RUBYOPT` at first.
518+
* `RUBY_DEBUG_ADDED_RUBYOPT`: Remove this value from `RUBYOPT` at first. This feature helps loading debug.gem with `RUBYOPT='-r debug/...'`, and you don't want to derive it to child processes. In this case, you can set `RUBY_DEBUG_ADDED_RUBYOPT='-r debug/...'` (same value), and this string will be deleted from `RUBYOPT` at first.
519519
* `RUBY_DEBUG_EDITOR` or `EDITOR`: An editor used by `edit` debug command.
520520
* `RUBY_DEBUG_BB`: Define `Kernel#bb` method which is alias of `Kernel#debugger`.
521521

@@ -527,7 +527,7 @@ If there is `~/.rdbgrc`, the file is loaded as an initial script (which contains
527527
* You can specify the initial script with `rdbg -x initial_script` (like gdb's `-x` option).
528528

529529
Initial scripts are useful to write your favorite configurations.
530-
For example, you can set break points with `break file:123` in `~/.rdbgrc`.
530+
For example, you can set breakpoints with `break file:123` in `~/.rdbgrc`.
531531

532532
If there are `~/.rdbgrc.rb` is available, it is also loaded as a ruby script at same timing.
533533

@@ -537,16 +537,16 @@ On the debug console, you can use the following debug commands.
537537

538538
There are additional features:
539539

540-
* `<expr>` without debug command is almost same as `pp <expr>`.
541-
* If the input line `<expr>` does *NOT* start with any debug command, the line `<expr>` will be evaluated as a Ruby expression and the result will be printed with `pp` method. So that the input `foo.bar` is same as `pp foo.bar`.
542-
* If `<expr>` is recognized as a debug command, of course it is not evaluated as a Ruby expression, but is executed as debug command. For example, you can not evaluate such single letter local variables `i`, `b`, `n`, `c` because they are single letter debug commands. Use `p i` instead.
543-
* So the author (Koichi Sasada) recommends to use `p`, `pp` or `eval` command to evaluate the Ruby expression everytime.
540+
* `<expr>` without debug command is almost the same as `pp <expr>`.
541+
* If the input line `<expr>` does *NOT* start with any debug command, the line `<expr>` will be evaluated as a Ruby expression, and the result will be printed with `pp` method. So that the input `foo.bar` is the same as `pp foo.bar`.
542+
* If `<expr>` is recognized as a debug command, of course, it is not evaluated as a Ruby expression but is executed as debug command. For example, you can not evaluate such single-letter local variables `i`, `b`, `n`, `c` because they are single-letter debug commands. Use `p i` instead.
543+
* So the author (Koichi Sasada) recommends using `p`, `pp` or `eval` command to evaluate the Ruby expression every time.
544544
* `Enter` without any input repeats the last command (useful when repeating `step`s) for some commands.
545545
* `Ctrl-D` is equal to `quit` command.
546546
* [debug command compare sheet - Google Sheets](https://docs.google.com/spreadsheets/d/1TlmmUDsvwK4sSIyoMv-io52BUUz__R5wpu-ComXlsw0/edit?usp=sharing)
547547

548548
You can use the following debug commands. Each command should be written in 1 line.
549-
The `[...]` notation means this part can be eliminate. For example, `s[tep]` means `s` or `step` are valid command. `ste` is not valid.
549+
The `[...]` notation means this part can be eliminated. For example, `s[tep]` means `s` or `step` is a valid command. `ste` is not valid.
550550
The `<...>` notation means the argument.
551551

552552
### Control flow
@@ -835,9 +835,9 @@ DEBUGGER__.start(no_color: true, # disable colorize
835835
836836
### `binding.break` method
837837
838-
`binding.break` (or `binding.b`) set breakpoints at written line. It also has several keywords.
838+
`binding.break` (or `binding.b`) set breakpoints at the written line. It also has several keywords.
839839
840-
If `do: 'command'` is specified, the debugger suspends the program and run the `command` as a debug command and continue the program.
840+
If `do: 'command'` is specified, the debugger suspends the program, runs the `command` as a debug command, and continues the program.
841841
It is useful if you only want to call a debug command and don't want to stop there.
842842
843843
```
@@ -847,9 +847,9 @@ def initialize
847847
end
848848
```
849849
850-
On this case, execute the `info` command then register a watch breakpoint for `@a` and continue to run. You can also use `;;` instead of `\n` to separate your commands.
850+
In this case, execute the `info` command then register a watch breakpoint for `@a` and continue to run. You can also use `;;` instead of `\n` to separate your commands.
851851
852-
If `pre: 'command'` is specified, the debugger suspends the program and run the `command` as a debug command, and keep suspend.
852+
If `pre: 'command'` is specified, the debugger suspends the program and runs the `command` as a debug command, and keeps suspended.
853853
It is useful if you have operations before suspend.
854854
855855
```
@@ -859,7 +859,7 @@ def foo
859859
end
860860
```
861861
862-
On this case, you can see the result of `bar()` every time you stop there.
862+
In this case, you can see the result of `bar()` every time you stop there.
863863
864864
## rdbg command help
865865

0 commit comments

Comments
 (0)