Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

with_debug

Temporarily set debugging compilation flags.


Description

Temporarily set debugging compilation flags.

Usage

with_debug(
  code,
  CFLAGS = NULL,
  CXXFLAGS = NULL,
  FFLAGS = NULL,
  FCFLAGS = NULL,
  debug = TRUE
)

Arguments

code

to execute.

CFLAGS

flags for compiling C code

CXXFLAGS

flags for compiling C++ code

FFLAGS

flags for compiling Fortran code.

FCFLAGS

flags for Fortran 9x code.

debug

If TRUE adds -g -O0 to all flags (Adding FFLAGS and FCFLAGS

See Also

Other debugging flags: compiler_flags()

Examples

flags <- names(compiler_flags(TRUE))
with_debug(Sys.getenv(flags))

## Not run: 
install("mypkg")
with_debug(install("mypkg"))

## End(Not run)

pkgbuild

Find Tools Needed to Build R Packages

v1.2.0
MIT + file LICENSE
Authors
Hadley Wickham [aut], Jim Hester [aut, cre], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.