-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
ARROW-14654: [R][Docs] Add article on how to run R with C++ debugger to dev docs #11658
Conversation
r/vignettes/developers/debugger.Rmd
Outdated
the bug. One way around this is to find the code that causes the error, and | ||
run R with a C++ debugger. | ||
|
||
Firstly, load R with your debugger. The most common debuggers are `gdb` and `lldb` |
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.
You might want to note up here that if you're on macOS, you're probably going to be using lldb.
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.
Done
r/vignettes/developers/debugger.Rmd
Outdated
|
||
Now, run your code - either directly in the session or by sourcing it from a | ||
file. If the code results in a segfault, you will have extra output that you | ||
can use to diagnose the problem or attach to an issue as extra 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.
You may want to link to more than just Davis's (very good) blog post. Like to good references of gdb and lldb commands, which are similar but not the same. And/or other blog posts about debugging in R.
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.
Have added a few bits including equivalent gdb and lldb commands now.
I tried to set up llvm to see if there were any differences but ran into what is apparently a known issue...that you can't attach a debugger to the official R install MacOS (because of security stuff...reference here + workaround: https://mac.r-project.org/bin/macosx/RMacOSX-FAQ.html#I-cannot-attach-debugger-to-R courtesy of Jim and Gabor). Not sure if that's worth putting into the vignette or not! |
Thanks for testing that out; it is 100% worth adding - good call! |
Benchmark runs are scheduled for baseline = d738cb1 and contender = 8f0a560. 8f0a560 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
This PR adds an article about how to run R with the C++ debugger to the dev docs. It also adds a submenu for articles to be published on the
pkgdown
site but not distributed with the package as vignettes. Note that the current R developer guide remains as it's own menu option so we don't break links to it in other packages.