[Rcpp-devel] Debugging an Rcpp/RCppArmadillo program?
Dirk Eddelbuettel
edd at debian.org
Mon Apr 8 15:35:18 CEST 2013
On 8 April 2013 at 09:27, Andre Mikulec wrote:
| Hi,
|
| Pardon me. I am relatively new.
|
| What is a way ( or effective way ) to debug an Rcpp/RCppArmadillo program that
| is running within R?
|
| Do I try somehow to set an inline RCpp/RCppArmidillo
| script attribute to 'Debug' ( if this exists? )
|
| Do I recompile R ( with perhaps 'g++ -g -O0' and try to debug an
| Rcpp/RCpp Armadillo file (.so/.dll) in an attached process in the gdb
| debugger?
Yes.
There is a section in the Writing R Extensions manual on this. It takes some practice.
| Do I just create an ( independent from R ) Armadillo C++ program .exe ( made
| with 'g++ -g -O0 )
| ( and use my own BLAS/LAPACK ) outside of R, and just debug the .exe it using
| gdb?
|
| Or, do I simply, in R, just put many 'print statements' in the inline RCpp/
| RCppArmidillo script?
Yes, and rebuild/reload/rerun your test scripts. Tedious, but reliable.
Dirk
| What is a strategy?
|
| Thank you,
| Andre Mikulec
| Andre_Mikulec at Hotmail.com
|
|
| ----------------------------------------------------------------------
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list