debugcall

0th

Percentile

Debug a Call

Set or unset debugging flags based on a call to a function. Takes into account S3/S4 method dispatch based on the classes of the arguments in the call.

Keywords
utilities, programming, environment
Usage
debugcall(call, once = FALSE)
undebugcall(call)
Arguments
call

An R expression calling a function. The called function will be debugged. See Details.

once

logical; if TRUE, debugging only occurs once, as via debugonce. Defaults to FALSE

Details

debugcall debugs the non-generic function, S3 method or S4 method that would be called by evaluating call. Thus, the user does not need to specify the signature when debugging methods. Although the call is actually to the generic, it is the method that is debugged, not the generic, except for non-standard S3 generics (see isS3stdGeneric).

Value

debugcall invisibly returns the debugged call expression.

Note

Non-standard evaluation is used to retrieve the call (via substitute). For this reason, passing a variable containing a call expression, rather than the call expression itself, will not work.

See Also

debug for the primary debugging interface

Aliases
  • debugcall
  • undebugcall
Examples
library(utils) # NOT RUN { ## Evaluate call after setting debugging ## f <- factor(1:10) res <- eval(debugcall(summary(f))) # }
Documentation reproduced from package utils, version 3.4.3, License: Part of R 3.4.3

Community examples

Looks like there are no examples yet.