[Rd] Debugging packages with compiled C code on Windows

Avraham Adler @vr@h@m@@d|er @end|ng |rom gm@||@com
Tue Jun 2 00:37:24 CEST 2020

Hello, Sue.

1. I work exclusively on Windows have packages with compiled C, C++,
and Fortran (2003+)  and I use RStudio to debug and work with them
using Rtools40, so I guess it's possible. Have I misunderstood and are
you asking about debugging assembler?
2. If you're using Jeroen's scripts, have you tried uncommenting and
adding that to EOPTS in MkRules.local.in? Note that
./src/gnuwin32/fixed/Makefile has a nasty habit of overriding various
optimizations that affect packages.
3. I don't think so
4. The default is that EOPTS is commented out. I talk about it a nit
more at length here [1]. Perhaps that would be of use?

[1] <https://www.avrahamadler.com/2020/05/12/building-r-4-for-windows-with-openblas/>

Good Luck,


On Mon, Jun 1, 2020 at 9:36 PM Sue McDonald <sudomeme using gmail.com> wrote:
> I have several related questions.
> 1.  Is it possible to use a GUI: Rstudio/Eclipse/Visual-studio to debug
> compiled code on Windows? Things that work on Eclipse for Windows do not
> work on Eclipse for Windows.
> 2.  R CMD INSTALL seems to override default attempts to provide
> CFLAGS="-DDEBUG -g3 -O0"
> 3.  Is it necessary to compile R with debug turned on?   One of the FAQs
> mentioned to compile R with make DEBUG=T.
> 4.  Using Rtools 4.0 and Jeroen's scripts for building R works great (many
> thanks). But does not seem to have an impact on optimization, other than
> including -gwarf-2.  It adds -DNDEBUG flag.  Is that sufficient for
> debugging compiled code in a package?  Obviously, I just need to debug
> package code, so does it matter?
> I am happy to write-up a FAQ.
> Thanks, SM
>         [[alternative HTML version deleted]]
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

More information about the R-devel mailing list