Skip to content

Focusing on a single object in the react log #1532

Closed

Description

@daattali

(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.

Activity

  1. happyshows commented on Jan 13, 2017

    @happyshows

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

  2. daattali commented on Jan 15, 2017

    @daattali
    ContributorAuthor

    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

  3. jcheng5 commented on Jan 15, 2017

    @jcheng5
    Member

    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)
  4. jcheng5 commented on Jan 15, 2017

    @jcheng5
    Member

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

  5. happyshows commented on Jan 15, 2017

    @happyshows

    @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.

  6. jcheng5 commented on Jan 15, 2017

    @jcheng5
    Member

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

  7. yonicd commented on Jan 25, 2017

    @yonicd
  8. aaron-horowitz commented on Jun 19, 2018

    @aaron-horowitz

    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

  9. daattali commented on Feb 6, 2019

    @daattali
    ContributorAuthor

    I believe this is solved with the new reactlog2.0

  10. alandipert commented on May 1, 2019

    @alandipert
    Contributor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions