SK_33
SK_33

Reputation: 87

R-Shiny debug mode

What is the equivalent in R-Shiny of the debug mode used in plotly-dash (Python), i.e. when running the app with Dash, we do the following: app.run_server(debug=True). In this way as the app is running on the host, any modification in the source code is mirrored in the opened web page. Is there such an equivalent when running an app in R-Shiny?

Upvotes: 1

Views: 915

Answers (1)

ismirsehregal
ismirsehregal

Reputation: 33472

As mentioned in the comments, all you need to do is setting the global option shiny.autoreload.

Here is a very simple example on how to use it:

library(shiny)

options(shiny.autoreload = TRUE) # also check shiny.reactlog and shiny.trace for debugging

ui <- fluidPage(
    sliderInput(inputId = "mySlider", label = "my super useful Slider", min = 0, max = 10, value = 20)
)

server <- function(input, output, session) {}

shinyApp(ui, server)

Result

For an overview of similar shiny options please see this article.

Upvotes: 1

Related Questions