Skip to content

Commit

Permalink
Add the debug parameter to load_all() (r-lib#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcol committed Nov 3, 2024
1 parent 96d1a74 commit 623d90a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
11 changes: 7 additions & 4 deletions R/load.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@
#' define a function directly in the R console. This is frustrating to debug,
#' as it feels like the changes you make to the package source aren't having
#' the expected effect.
#' @param debug if `TRUE` (the default) [pkgbuild::compile_dll()] will
#' add debugging flags; `FALSE` will prevent that from happening.
#' @keywords programming
#' @examples
#' \dontrun{
Expand All @@ -119,10 +121,11 @@ load_all <- function(path = ".",
attach_testthat = uses_testthat(path),
quiet = NULL,
recompile = FALSE,
warn_conflicts = TRUE) {
warn_conflicts = TRUE,
debug = TRUE) {
if (!isTRUE(reset)) {
lifecycle::deprecate_warn(
when = "1.3.5",
when = "1.3.5",
what = "load_all(reset)",
details = "`reset = FALSE` is no longer supported."
)
Expand Down Expand Up @@ -155,9 +158,9 @@ load_all <- function(path = ".",

if (isTRUE(compile)) {
pkgbuild::clean_dll(path)
pkgbuild::compile_dll(path, quiet = quiet)
pkgbuild::compile_dll(path, quiet = quiet, debug = debug)
} else if (identical(compile, NA)) {
pkgbuild::compile_dll(path, quiet = quiet)
pkgbuild::compile_dll(path, quiet = quiet, debug = debug)
} else if (identical(compile, FALSE)) {
# don't compile
} else {
Expand Down
6 changes: 5 additions & 1 deletion man/load_all.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 623d90a

Please sign in to comment.