New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add notes on how to exit the debugger [ci-skip] #45329
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think mentioning these commands is a good addition! 👍
@@ -344,6 +344,8 @@ Processing by PostsController#index as HTML | |||
(rdbg) | |||
``` | |||
|
|||
You can leave a debugging session with `quit` or `q` and confirm your action at the prompt or with `quit!` and its alias `q!` to bypass the prompt. In most cases though, you'd want to continue program execution with `continue` or `c`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that in most cases the user will want to continue, so let's mention that first:
You can leave a debugging session with `quit` or `q` and confirm your action at the prompt or with `quit!` and its alias `q!` to bypass the prompt. In most cases though, you'd want to continue program execution with `continue` or `c`. | |
You can exit the debugging session at any time and continue your application execution with the `continue` (or `c`) command. Or, to exit both the debugging session and your application, use the `quit` (or `q`) command. |
I added "at any time" because we've just introduced the debugging session, and we don't want to exit it just yet, based on the next section of the guide. (I also left out the quit!
/ q!
command for brevity.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This definitely better. Thanks ;)
🤔 Wouldn't be better to just replace this complex debugging section with simple example of just using |
There's a whole section on debugging with the debug gem in the docs. Personally I feel properly documenting its usage is necessary, Rails adds the debug gem by default to the Gemfile. |
@simi This section of the guide was recently added in #43621, with popular support. Speaking personally, I like the idea of leaning more on external documentation (== less maintenance burden for us), but such a change would need to be a clear improvement over what we have now, particularly in the context of debugging a Rails application. If you have clear improvements in mind, please submit a PR! 🙏 In the mean time, I think this is a helpful addition. Thank you, @siaw23! 👋 (Backported to |
@jonathanhefner In the end this rails guide seems like a good candidate to be ported to debug gem docs actually. Maybe one small section how to use simple |
Add notes on how to exit the debugger [ci-skip] (cherry picked from commit 4a55631)
Summary
A short note on how to quit the debugger. Fumbled a bit trying to leave the debugger.
Other Information