Shiny is an R package from RStudio that makes it incredibly easy to build interactive web applications with R. The complexity of the reactive elements within a shiny application can quickly become complicated and are difficult to debug.
reactlog provides a visual debugger for shiny reactivity. After logging the reactive interactions of a shiny application,
reactlog visualizes the shiny reaction state at any time point in the record.
reactlog dependency graph provides users with the ability to visually see if reactive elements are:
- not utilized (never retrieved)
- over utilized (called independently many times)
- interacting with unexpected elements
- invalidating all expected dependencies
- freezing (and thawing), preventing triggering of future reactivity
- Display the reactivity dependency graph of your shiny applications
- See how often elements of your shiny application are being processed
- Move throughout your reactive history to replay element interactions
- Highlight family trees within the reactive graph
- Filter on family trees within the reactive graph
For the latest version:
library(shiny) library(reactlog) # tell shiny to log reactivity options("shiny.reactlog" = TRUE) # run a shiny app app <- system.file("examples/01_hello", package = "shiny") runApp(app) # once app has closed, display reactlog show_reactlog()
Or while your shiny app is running, press the key combination
Cmd+F3) to launch the reactlog application.
To mark a specific execution time point within your shiny app, press the key combination Ctrl+F4 (Mac: Cmd+F4). This will highlight a specific point in time in your reactlog.
By changing the file
'./inst/defaultLog.js' with the contents of any log file in
'./inst/log-files/', different default log files can be loaded. Once the local js (
'./inst/reactlogAsset/reactlog.js') has been built with
yarn build or
yarn watch, refresh
'./inst/reactlog.html' to avoid constantly spawning shiny applications for testing.
Guidelines for contributing
We welcome contributions to the reactlog package. Please see our CONTRIBUTING.md file for detailed guidelines of how to contribute.
Please note that the 'reactlog' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.