with_trace: Wrapper around 'trace' to untrace when finished

View source: R/trace.R

with_traceR Documentation

Wrapper around 'trace' to untrace when finished

Description

Wrapper around 'trace' to untrace when finished

Usage

with_trace(
  x,
  where = topenv(parent.frame()),
  print = getOption("httptest2.debug.trace", FALSE),
  ...,
  expr
)

Arguments

x

Name of function to trace. See base::trace().

where

where to look for the function to be traced.

print

Logical: print a message every time the traced function is hit? Default is FALSE; note that in trace, the default is TRUE.

...

Additional arguments to pass to trace. At minimum, must include either tracer or exit.

expr

Code to run inside the context

Value

The result of expr


httptest2 documentation built on May 29, 2024, 8:42 a.m.