Skip to content

Commit bbdb23d

Browse files
Merge pull request rails#51064 from mkasberg/debugging-guide
Fix typo in Debugging Guide [ci skip]
2 parents e98bbd0 + 72410ff commit bbdb23d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

guides/source/debugging_rails_applications.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -704,13 +704,13 @@ Stop by #0 BP - Watch #<PostsController:0x00007fce69ca5320> @_response_body =
704704
In addition to different types of breakpoints, you can also specify options to achieve more advanced debugging workflows. Currently, the debugger supports 4 options:
705705

706706
- `do: <cmd or expr>` - when the breakpoint is triggered, execute the given command/expression and continue the program:
707-
- `break Foo#bar do: bt` - when `Foo#bar` is called, print the stack frames
707+
- `break Foo#bar do: bt` - when `Foo#bar` is called, print the stack frames.
708708
- `pre: <cmd or expr>` - when the breakpoint is triggered, execute the given command/expression before stopping:
709709
- `break Foo#bar pre: info` - when `Foo#bar` is called, print its surrounding variables before stopping.
710710
- `if: <expr>` - the breakpoint only stops if the result of `<expr`> is true:
711-
- `break Post#save if: params[:debug]` - stops at `Post#save` if `params[:debug]` is also true
711+
- `break Post#save if: params[:debug]` - stops at `Post#save` if `params[:debug]` is also true.
712712
- `path: <path_regexp>` - the breakpoint only stops if the event that triggers it (e.g. a method call) happens from the given path:
713-
- `break Post#save if: app/services/a_service` - stops at `Post#save` if the method call happens at a method matches Ruby regexp `/app\/services\/a_service/`.
713+
- `break Post#save path: app/services/a_service` - stops at `Post#save` if the method call happens at a path that includes `app/services/a_service`.
714714

715715
Please also note that the first 3 options: `do:`, `pre:` and `if:` are also available for the debug statements we mentioned earlier. For example:
716716

0 commit comments

Comments
 (0)