-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
I encountered this issue after debugging a nested function in an apply loop, as recreated below.
After running apply(..., FUN = foo), the debug buffer which opens will always show foo() being debugged, even though the R is correctly debugging another function (bar() in the provided example).
This issue persists whether or not the debug buffer is closed after debugging foo().
foo <- function(n) {
print("in foo()")
resultFoo <- bar(2 * n)
resultFoo
}
bar <- function(n) {
print("in bar()")
resultBar <- 3 * n
resultBar
}
debug(foo)
apply(matrix(1:3, ncol = 1), MARGIN = 1, FUN = foo) # debugging buffer opened
# go through debugging and close debugging buffer
undebug(foo)
debug(bar)
bar(2) # debugging buffer for foo() opens upReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels