Debug(x, breakpoints=list(), types=rep("n", length(breakpoints)), entryStop=F)
breakpoints
. Allowed values are: "n", a
function name; "f", a file name; "t", a string containing the function
definition. This vector should have the same length as the
breakpoints
list.
x
.
A call to
Debug
causes execution of the
S-PLUS expression given by
x
to stop at the
first breakpoint specified by
breakpoints
or
on entry to the expression if
entryStop=T
.
The debugger's prompt, "my debug>" will appear on the S-PLUS command line.
Type "?" or "h" to see the list of debugger commands.
# Debug a call to lm() with breakpoints at lines 10, 14 and 23 in lm. Debug(lm(Mileage ~ Weight - 1, data = fuel.frame), breakpoints = list(lm = c(10, 14, 23)), type = "n")
# Debug a user defined function, with breakpoints at lines 2 and 3 Debug(foo(2), breakpoints=list("foo<-function(x) {\ny <- x+4\ny\n}"=c(2,3)), type="t")
# Create a file named "foo.q" containing this: foo <- function(x) { y <- x+4 y } # Debug a call to a function in file "foo.q" Debug(foo(2), breakpoints=list("foo.q"=c(2,3)), type="f")