[R-pkg-devel] debugging R CMD build

Ivan Krylov |kry|ov @end|ng |rom d|@root@org
Fri Jun 7 16:02:26 CEST 2024


В Fri, 7 Jun 2024 08:40:48 -0400
Vincent Carey <stvjc using channing.harvard.edu> пишет:

> I wanted to know if anyone has a way of stepping through in a CMD
> build task.

On Linux, R CMD build launches file.path(R.home('bin'), 'build'), which
is a short script. It should be possible to step into R CMD build by
doing the same thing in an interactive R session:

R_DEFAULT_PACKAGES= LC_COLLATE=C R --no-restore
# set hooks as needed
debug(system)
debug(system2)
# run CMD build
tools:::.build_packages(args = 'package/source/directory')

-- 
Best regards,
Ivan



More information about the R-package-devel mailing list