-
Notifications
You must be signed in to change notification settings - Fork 130
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
Restructure documents #717
base: master
Are you sure you want to change the base?
Conversation
@@ -2,548 +2,282 @@ | |||
|
|||
# debug.rb | |||
|
|||
This library provides debugging functionality to Ruby (MRI) 2.6 and later. | |||
|
|||
This debug.rb is replacement of traditional lib/debug.rb standard library which is implemented by `set_trace_func`. |
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 removed this part because not many developers don't even know about the old debug.rb
- See [activate the debugger in your program](#activate-the-debugger-in-your-program) for details | ||
- Configurable: | ||
- It provides many configurations and is configurable through the `~/.rdbgrc` file | ||
- See the [configuration guide](/docs/configuration.md) for more information |
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 we can add a docs/concurrency_support.md
and add a Concurrency support:
here for information and multi-thread/process and Ractor support. But I'm not sure what'd be the content in it so I haven't done it.
* By `rdbg` command | ||
* By loading libraries with `-r` command line option | ||
* By calling Ruby's method explicitly | ||
* Misc |
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.
The points here are not clear to users without further explanation, so I removed them for now.
|
||
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`. | ||
### VSCode and Chrome Devtools integration |
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 if we can add images or even gifs for the integrations here, it'll get people's attention to trying them out.
1. You will see a dialog "Debug command line" and you can choose your favorite command line your want to run. | ||
1. Chosen command line is invoked with `rdbg -c` and VSCode shows the details at breakpoints. | ||
|
||
### Debug a Rails/web application |
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 is a new section
|
||
- `RUBY_DEBUG_SOCK_DIR` - This is where the debugger will create and look for socket files. | ||
- `RUBY_DEBUG_SOCK_PATH` - This is the socket file's absolute path that will be used to connect to the debugger. | ||
- Currently, the debugger expects socket files to have a `ruby-debug-#{USER}` prefix during socket lookup. But this may be changed in the future. |
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 know you don't want to maintain this, but it's important for anyone who wants to set up the debugger at scale. And I also make it clear that it's subject to change.
Can I see the updated doc in HTML? (I want to see on the rendered page) |
You can click into my branch and it's the rendered result. And in general you can visit a PR's branch by clicking its name: |
Thank you. I'll review it but now I'm busy so please wait a while. |
1365634
to
0fba963
Compare
0fba963
to
a6e6551
Compare
@ko1 I've rebased it against master and applied some updates. Would you mind giving it a look again? |
These changes was done with these focus:
Main Changes
docs
I'll document some details in comments.