Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph Debugging Tool #154

Closed
dsherret opened this issue Mar 17, 2020 · 0 comments
Closed

Graph Debugging Tool #154

dsherret opened this issue Mar 17, 2020 · 0 comments
Labels
domain: core Relates to the core library.

Comments

@dsherret
Copy link
Member

The graph is getting very complex for TypeScript. In the future, there needs to be a tool that quickly answers the following questions:

  1. What path in the graph printed out the final text?
  2. What paths did the printer consider before it got to the final text and what was the state of everything as it traversed the graph?

I'm thinking there are two tasks here:

  1. Output snapshots of every step in the printer and its current state (along with the writer's state) along with another set of data that describes the generated IR. There should be IDs on each node in order to link up with the snapshot data.
  2. Take that final data and show the graph in the browser. Then have a slider that allows someone to progress through the printer snapshots. As they progress, it should show the current state of everything along with showing the current node and the path the printer has taken.

This would be very cool and save me a lot of time. It would also be a good educational tool to explain how dprint works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: core Relates to the core library.
Projects
None yet
Development

No branches or pull requests

1 participant