Get the Current Active Trace
Examples
# Outside a trace, returns NULL
current_trace()
#> NULL
# Inside a trace, returns the active Trace
with_trace("demo", {
tr <- current_trace()
tr$name
})
#> [1] "demo"
Get the Current Active Trace
# Outside a trace, returns NULL
current_trace()
#> NULL
# Inside a trace, returns the active Trace
with_trace("demo", {
tr <- current_trace()
tr$name
})
#> [1] "demo"