You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,8 +60,14 @@ There are several options for (1) and (2). Please choose your favorite way.
60
60
61
61
### Modify source code with [`binding.break`](#bindingbreak-method) (similar to `binding.pry` or `binding.irb`)
62
62
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.
65
71
66
72
The following example shows the demonstration of [`binding.break`](#bindingbreak-method).
Copy file name to clipboardExpand all lines: misc/README.md.erb
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -60,8 +60,14 @@ There are several options for (1) and (2). Please choose your favorite way.
60
60
61
61
### Modify source code with [`binding.break`](#bindingbreak-method) (similar to `binding.pry` or `binding.irb`)
62
62
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.
65
71
66
72
The following example shows the demonstration of [`binding.break`](#bindingbreak-method).
0 commit comments