Feel free to share the content but please refer back to this original post whenever possible. Thanks, I appreciate it. The code comes without warranty and no responsibility is taken. There may be typos.
Here I document my setup for debugging the C++ code of any R package. This collection of files assumes that the stochvol
package is debugged. This should work with C code as well, and it does not matter whether the package uses Rcpp
.
The setup uses GDB. Most importantly, the package has to be compiled with debug information and ideally with all optimizations turned off.