ARROW-14654: [R][Docs] Add article on how to run R with C++ debugger to dev docs#11658
ARROW-14654: [R][Docs] Add article on how to run R with C++ debugger to dev docs#11658thisisnic wants to merge 5 commits intoapache:masterfrom
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.
You might want to note up here that if you're on macOS, you're probably going to be using lldb.
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.
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.
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
pkgdownsite 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.