Skip to content
Prev 5663 / 10988 Next

[Rcpp-devel] Debugging an Rcpp/RCppArmadillo program?

On 13-04-08 07:57 AM, Dirk Eddelbuettel wrote:
I run "R -d gdb" instead. From the terminal

1. type "R -d gdb" at the shell prompt
2. when gdb starts, type "r"
3. R will start -- at the R prompt load your package: "library(yourpackage)"
4. type Ctrl-C to drop back into the debugger
5. set breakpoints ("break file.cpp:123" or "break MyFunction")
6. type "c" to continue executing R
7. invoke the relevant functions in your package.

Davor