Skip to content

Commit baf98e4

Browse files
ahangarhako1
authored andcommitted
Further improvement
1 parent 90084d8 commit baf98e4

File tree

2 files changed

+54
-54
lines changed

2 files changed

+54
-54
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ DEBUGGER: Session start (pid: 7656)
180180
#1 BP - Line /mnt/c/ko1/src/rb/ruby-debug/target.rb:5 (line)
181181
```
182182

183-
You can see that two breakpoints are registered. Let's continue the program by `continue` command.
183+
You can see that two breakpoints are registered. Let's continue the program by using the `continue` command.
184184

185185
```shell
186186
(rdbg) continue
@@ -200,8 +200,8 @@ Stop by #0 BP - Line /mnt/c/ko1/src/rb/ruby-debug/target.rb:3 (line)
200200
```
201201

202202
You can see that we can stop at line 3.
203-
Let's see the local variables with `info` command, and continue.
204-
You can also confirm that the program will suspend at line 5 and you can use `info` command again.
203+
Let's see the local variables with the `info` command, and continue.
204+
You can also confirm that the program will suspend at line 5 and you can use the `info` command again.
205205

206206
```shell
207207
(rdbg) info
@@ -245,7 +245,7 @@ It will help if you want to know what the program is doing.
245245
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.
248-
* With `-c` option, `rdbg -c <name>` means that `<name>` is command in `PATH` and simply invoke it with the debugger.
248+
* With `-c` option, `rdbg -c <name>` means that `<name>` is a command in `PATH` and simply invokes it with the debugger.
249249

250250
Examples:
251251
* `rdbg -c -- rails server`
@@ -263,12 +263,12 @@ Like other languages, you can use this debugger on the VSCode.
263263

264264
1. Install [VSCode rdbg Ruby Debugger - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=KoichiSasada.vscode-rdbg)
265265
2. Open `.rb` file (e.g. `target.rb`)
266-
3. Register breakpoints with "Toggle breakpoint" in Run menu (or type F9 key)
266+
3. Register breakpoints with "Toggle breakpoint" in the Run menu (or type F9 key)
267267
4. Choose "Start debugging" in "Run" menu (or type F5 key)
268268
5. You will see a dialog "Debug command line" and you can choose your favorite command line you want to run.
269269
6. Chosen command line is invoked with `rdbg -c`, and VSCode shows the details at breakpoints.
270270

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

273273
You can configure the extension in `.vscode/launch.json`.
274274
Please see the extension page for more details.
@@ -283,7 +283,7 @@ You can use this debugger as a remote debugger. For example, it will help in the
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 debugged, and the remote debugger console can attach to the debuggee anytime.
286+
You can run your application as a remote debuggee, and the remote debugger console can attach to the debuggee anytime.
287287

288288
### Invoke as a remote debuggee
289289

@@ -305,7 +305,7 @@ DEBUGGER: Debugger can attach via UNIX domain socket (/home/ko1/.ruby-debug-sock
305305
DEBUGGER: wait for debugger connection...
306306
```
307307

308-
By default, `rdbg --open` uses UNIX domain socket and generates path name automatically (`/home/ko1/.ruby-debug-sock/ruby-debug-ko1-7773` in this case).
308+
By default, `rdbg --open` uses UNIX domain socket and generates the path name automatically (`/home/ko1/.ruby-debug-sock/ruby-debug-ko1-7773` in this case).
309309

310310
You can connect to the debuggee with `rdbg --attach` command (`rdbg -A` for short).
311311

@@ -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 connects to it. If there are more files, you need to specify the file.
327+
If there are 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

329329
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 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.
331+
NOTE: If you use the `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

@@ -343,11 +343,11 @@ Note that all messages communicated between the debugger and the debuggee are *N
343343

344344
#### `require 'debug/open'` in a program
345345

346-
If you can modify the program, you can open debugging port by adding `require 'debug/open'` line in the program.
346+
If you can modify the program, you can open the debugging port by adding `require 'debug/open'` line in the program.
347347

348348
If you don't want to stop the program at the beginning, you can also use `require 'debug/open_nonstop'`.
349349
Using `debug/open_nonstop` is useful if you want to open a backdoor to the application.
350-
However, it is also danger because it can become another vulnerability.
350+
However, it is also dangerous because it can become another vulnerability.
351351
Please use it carefully.
352352

353353
By default, UNIX domain socket is used for the debugging port. To use TCP/IP, you can set the `RUBY_DEBUG_PORT` environment variable.
@@ -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 to VSCode later with the following steps.
375+
If you don't run a debuggee Ruby process on VSCode, you can attach it 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

@@ -816,7 +816,7 @@ Emacs support available.
816816
817817
#### Start by method
818818
819-
After loading `debug/session`, you can start debug session with the following methods. They are convenient if you want to specify debug configurations in your program.
819+
After loading `debug/session`, you can start a debug session with the following methods. They are convenient if you want to specify debug configurations in your program.
820820
821821
* `DEBUGGER__.start(**kw)`: start debug session with local console.
822822
* `DEBUGGER__.open(**kw)`: open debug port with configuration (without configurations open with UNIX domain socket)

0 commit comments

Comments
 (0)