Wrapper around 'trace' to untrace when finished
Usage
with_trace(
x,
where = topenv(parent.frame()),
print = getOption("httptest.debug", FALSE),
...,
expr
)
Arguments
- x
Name of function to trace. See
base::trace()
.- where
where to look for the function to be traced.
Logical: print a message every time the traced function is hit? Default is
FALSE
; note that intrace
, the default isTRUE
.- ...
Additional arguments to pass to
trace
. At minimum, must include eithertracer
orexit
.- expr
Code to run inside the context