if (FALSE) {
# Trace all function from the graphics package, except for `plot.default`
# as it defines its own on.exit() handler, i.e. exit tracing is impossible.
local({
trace_package("graphics", funign = "plot.default")
on.exit(untrace_package("graphics"), add = TRUE)
plot(1:10)
})
}
Run the code above in your browser using DataLab