dbuenzli / react

Declarative events and signals for OCaml
http://erratique.ch/software/react
ISC License
134 stars 14 forks source link

debugging feature: output dependency graph #14

Open nilsbecker opened 10 years ago

nilsbecker commented 10 years ago

it would help debugging the logic of a react program to be able to see the full dependency graph in some way. especially if signals/events are created dynamically. for instance one could think of creating a DOT file by walking the dependencies, where the nodes would be labeled by variable name and signal/event type. this could then be visualized nicely by available tools.

i'm not sure this is easy to do since at runtime not all of the required information may be available? just a suggestion - feel free to close.

dbuenzli commented 10 years ago

There is definitively room for improvement on that point.

E.g. I use this branch when I need to debug react itself. Note that OCaml 4.02 added very useful debugging variables that I'm sure can be used with S.trace to improve the situation a bit. Though that won't give you a clear view of the dependency graph.