[R-pkg-devel] scripting R through lldb

Guillaume Chapron carnivorescience at gmail.com
Wed Jun 15 21:39:51 CEST 2016


I am debugging a package that contains some compiled C code. The C code uses R random number generator so I cannot (or have not figured out how to) debug it without running it through R. What I do is to type the following in the terminal:

R --debugger=lldb

then in the lldb prompt


and within R


which is the file calling the C library. When the library crashes I can navigate the C memory to see where is the problem.

My question is whether there is a way to have this in single line or script to run from the terminal. I have looked on stackoverflow but could not find.

Many thanks


More information about the R-package-devel mailing list