Skip to content

Commit 91a4410

Browse files
st0012ko1
authored andcommitted
Update readme for the 'debugger' statement
1 parent 0d4945c commit 91a4410

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,14 @@ There are several options for (1) and (2). Please choose your favorite way.
6060

6161
### Modify source code with [`binding.break`](#bindingbreak-method) (similar to `binding.pry` or `binding.irb`)
6262

63-
If you can modify the source code, you can use the debugger by adding `require 'debug'` line at the top of your program and putting [`binding.break`](#bindingbreak-method) method (`binding.b` for short) into lines where you want to stop as breakpoints like `binding.pry` and `binding.irb`.
64-
After that, you run the program as usual and you will enter the debug console at breakpoints you inserted.
63+
If you can modify the source code, you can use the debugger by adding `require 'debug'` at the top of your program and putting [`binding.break`](#bindingbreak-method) method into lines where you want to stop as breakpoints like `binding.pry` and `binding.irb`.
64+
65+
You can also use its 2 aliases in the same way:
66+
67+
- `binding.b`
68+
- `debugger`
69+
70+
After that, run the program as usual and you will enter the debug console at breakpoints you inserted.
6571

6672
The following example shows the demonstration of [`binding.break`](#bindingbreak-method).
6773

misc/README.md.erb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,14 @@ There are several options for (1) and (2). Please choose your favorite way.
6060

6161
### Modify source code with [`binding.break`](#bindingbreak-method) (similar to `binding.pry` or `binding.irb`)
6262

63-
If you can modify the source code, you can use the debugger by adding `require 'debug'` line at the top of your program and putting [`binding.break`](#bindingbreak-method) method (`binding.b` for short) into lines where you want to stop as breakpoints like `binding.pry` and `binding.irb`.
64-
After that, you run the program as usual and you will enter the debug console at breakpoints you inserted.
63+
If you can modify the source code, you can use the debugger by adding `require 'debug'` at the top of your program and putting [`binding.break`](#bindingbreak-method) method into lines where you want to stop as breakpoints like `binding.pry` and `binding.irb`.
64+
65+
You can also use its 2 aliases in the same way:
66+
67+
- `binding.b`
68+
- `debugger`
69+
70+
After that, run the program as usual and you will enter the debug console at breakpoints you inserted.
6571

6672
The following example shows the demonstration of [`binding.break`](#bindingbreak-method).
6773

0 commit comments

Comments
 (0)