24

I remember having used an option setting that enable to print in the R console the messages between the server and ui while a shiny app is running. This option is really useful to understand what is happening in the app. However I cant remember the name of that option and can not find it anymore in the documentation. Can someone can tell what is that option ? Thanks!

user2147028
  • 1,281
  • 13
  • 19
  • Do you mean something like `print` or `cat`? Or `browser()`, which stops the execution and opens a browser environment? Check also the [debugging Shiny lesson](http://www.rstudio.com/shiny/lessons/Lesson-10/) – Guillem Vicens Apr 11 '14 at 12:48
  • No. That's an option were all the messages between the ui and server are printed on the R console. For example if you change the value in one widget of the interface, then the interface send a message to the server that this value has changed. That's really different from the functions that are described in the debugging Shiny lesson. That's apparently an undocumented feature and I can not remember where I found it originally. If I remeber well this was set up by a call to `options()` – user2147028 Apr 12 '14 at 13:21

2 Answers2

51

I finally found it :

options(shiny.trace=TRUE)

Before running the app. I find it extremely useful to understand what is appending. I don't know why it is not more documented.

user2147028
  • 1,281
  • 13
  • 19
  • Why this is so hard to find?! Debugging shiny is a nightmare, thanks for pointing this one! – Tim Jul 16 '15 at 09:18
  • 5
    How do you make this work when you are hosting the shiny app remotely? Where do you make the call to options()? – Paul Feb 17 '16 at 02:14
1

R Studio lists a nice summary of R Shiny global options available here

You may wish to turn both of these on: options(shiny.trace=TRUE) options(shiny.fullstacktrace=TRUE)

SeGa
  • 9,454
  • 3
  • 31
  • 70
SteveMW
  • 33
  • 5