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

Generate object graph visualization in a fully language-agnostic way in GenericEvaluator #84

Merged
merged 13 commits into from
Sep 29, 2020

Conversation

fwcd
Copy link
Contributor

@fwcd fwcd commented Sep 2, 2020

Fixes #83

As proposed in the issue, this PR generates a graph visualization of the program's state purely from Debug Adapter Protocol information, thereby making it possible (in theory) to visualize every language that can be debugged using VSCode.

Example using Kotlin:

image

@hediet
Copy link
Owner

hediet commented Sep 2, 2020

Wow that is awesome! Thank you! Looks really cool, but I have to see how it fits into the larger picture. At first glance, this makes string based json visualizations impossible (?). The object graph is only one of many supported visualizations.

A BFS generates a better graph if the graph is very deep since a DFS
would get stuck in the first branch (if the limit is low).
@fwcd
Copy link
Contributor Author

fwcd commented Sep 2, 2020

Yes, this currently overrides the JSON visualization if the evaluation result has child variables. Thanks for the feedback, however!

I have tested the object graph with Python, to see whether it works with other languages, and it does, though the graph gets a bit unwieldy with all of Python's internal class attributes:

image

@hediet
Copy link
Owner

hediet commented Sep 2, 2020

It might be a good fallback for non-string values for languages without support for data extractors. The user should be able to understand why this graph is being shown though. Maybe the extension can visualize a flow graph that explains the flow of data on request ;)

I will look at your pr soon in more detail!

Copy link
Owner

@hediet hediet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@hediet hediet merged commit 9c70e06 into hediet:master Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement fully language-agnostic Evaluator
2 participants