I maintain a shiny app > 3000 lines of code. During execution I observe warnings, which might indicate issues I want to follow up for quality management. E.g.
Warning in run(timeoutMs) : 'tzone' attributes are inconsistent
From within the code it is not obvious, where the warning might be created, hence inspecting the code line by line using browser()
is not an option (Albeit I tried using options(warn = 1)
).
I also tried converting the warnings to errors and then to use debugging techniques via:
options(warn = 2)
options(error = recover)
However, with no success. In this particular case I obtain:
Enter a frame number, or 0 to exit
1: shiny::runApp("appFolder")
2: shinyCallingHandlers(while (!.globals$stopped) {
serviceApp()
Sys.sleep(0.001)
})
3: withCallingHandlers(expr, error = function(e) {
handle <- getOption("shiny.error")
if (is.function(handle))
handle()
})
4 : serviceApp()
5 : service(timeout)
6 : run(timeoutMs)
7 : .signalSimpleWarning("'tzone' attributes are incosistent", quote(run(timeoutMs)))
8 : withRestarts({
.Internal(.signalcondition(simpleWarning(msg, call), msg, call))
.Internal(.dfltWarn(msg, call))
}, muffleWarning = function () NULL)
9 : withOneRestart(expr, restarts[[1]])
10 : doWithOneRestart(return(expr), restart)
Selection:
Observing the individual frames did not help me. The answer at R Debugging - Cannot see which line generates warning message (Shiny) did also not help.
Anybody ideas?