Shiny: Focusing on a single object in the react log

Created on 12 Jan 2017  路  11Comments  路  Source: rstudio/shiny

(This has been sent to @jcheng5 and @bborgesr as private emails but I wanted to make an official request)

Using options(shiny.reactlog=TRUE) is awesome and makes a beautiful and useful graph that helps tracing the reactive values to see all the moving parts. It's great for debugging simple apps.

But in large apps with a lot of reactives, the graph gets overwhelming and very difficult to comprehend. It's especially an issue if there's one particular reactive value or a specific observer that I want to follow.

For example, I could be wondering why my code is entering a reactive context block, so I want to try to trace it to see exactly what value triggers it. It'd be great to be able to tell exactly what value was invalidated, or to be able to filter objects out of the react log.

All 11 comments

I'm also a bit confused by this debugging tool. Does it support nested module? The log seems to stop at root level.

Just throwing another idea out there: have a dropdown or checkboxes or some sort of UI that lets you enable/disable certain reactives from the graph

More ideas:

  • Jump to next "end of reactive loop" state (i.e. everything is white)
  • Zoom/focus on reactive object (eliminate everything that isn't reachable from that object)

@happyshows, is it different if you run showReactLog() from the console instead of Ctrl+F3?

@jcheng5 I tried to launch showReactLog() and runApp, no reactivity was captured. Not sure the correct usage of this approach.

I was trying to debug this where I saw react log stopped after the level 2 modules. This gist was to illustrate this issue.

Ok. I'm not near a computer today but I'll look later.

internal note: d3 chord example -- http://bl.ocks.org/AndrewRP/7468330

here is a rough attempt at what dean was going for -- (https://github.com/yonicd/shinyProf/tree/master/shiny)

Some sort of visual code inspection tool like React-Sight or React-Monocle would be really powerful, especially for large applications where reactLog becomes a nightmare. It appears a similar / same structure to what @yonicd created could be a good solution. A cleaner exposure of shiny:::.graphStack$as_list() could even be enough to let the community interrogate the reactlog however they please

I believe this is solved with the new reactlog2.0

reactlog has been completely rewritten 馃帄 and supports filtering, so closing this. reactlog is also now a separate package, so please file issues and feature requests over here moving forward: https://github.com/rstudio/reactlog

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dmpe picture dmpe  路  4Comments

hudon picture hudon  路  4Comments

FrissAnalytics picture FrissAnalytics  路  5Comments

snowman55 picture snowman55  路  5Comments

Stophface picture Stophface  路  3Comments