First step (optional):
-
compile the R extension without compiler optimizations (to avoid unexpected debug behavior, debug symbols are on by default, -g).
Add
CXX11FLAGS = -g -O0
to your~/.R/Makevars
(note: notgrf/src/Makevars
) and reinstall/recompile the package as usual (Rstudio->Build). You can see the system compile options with$ R CMD config CXX11FLAGS