This reminds me a bit of `ddd` [0] which has been around ~forever. It really helped me visualize some object relationships in ThoughtTreasure [1] back in school.
A main difference seems to be you have to tell vscode-debug-visualizer how/what to show in the code, whereas with ddd you either point-and-click or else run gdb/ddd commands like `graph display _variablename_`. I guess you could probably script the latter, but I like how vscode-debug-visualizer reifies what you're visualizing into the code itself instead of into a debugging session. [0] https://www.gnu.org/software/ddd/
[1] https://en.wikipedia.org/wiki/ThoughtTreasure
I too enjoyed using ddd back in the day. A few weeks ago I needed to visualize a complicated data structure in a Rust program that I'm working on and sadly it completely failed (http://db48x.net/reposurgeon/Screenshot%20from%202020-08-04%...). I spent some time trying to figure out how it was supposed to work (my guess is that GDB's pretty-printer is getting in the way), but didn't have much luck. I think we're going to have to reimplement some of this stuff. I ended up writing some code to dump the data structure out to graphviz. (http://db48x.net/reposurgeon/pathmap-diagrams/generated-path...)
All visualizations (i.e. json ~> ui transformers) are available as standalone library too. A playground can be found at [1]. The entire project is open source and can be easily extended!
Here's my modest plea to authors of extensions like this: please consider creating a "standalone" version, too. The AST viewer in the GIF is a good example of a tool that doesn't need the whole VSCode framework around it; it can be implemented in a single "ASTViewer.html" that can be double clicked or dragged and dropped into the user's browser, which is probably already open.
EDIT: I see comments from the author below, where there's some version of this tool online, but it goes for other authors, too, and the ability to run it from a truly standalone, single-file viewer.
I refactored all the visualization out into a standalone framework. I share your view ;) Except that it should not be a single file. That is technically neither feasible nor required.
Well, maybe it actually is easier than I thought to bundle everything into a single html file (I thought you couldn't embed fonts into html, but apparently you can [1]).
Anyways, in case of this application, all visualizations together are like 20MB (the monaco editor is a significant part of it). Having them split up and only loading things one demand significantly increases startup time. Also, base64-encoding all the binary resources is a little bit inefficient. [1] https://www.mediaevent.de/font-in-css-einbetten/
We use http://Nx.dev to split up example apps and libs into separate packages. I have a “visualizer” package, a “devtools” (for use in browser), will potentially add an electron app etc later
The app I'm making called Repla (https://repla.app) is designed for this purpose. To be able to take the things typically done in the "preview" side of VS Code and break them out into their own window that's usable with any text editor.
> Here's my modest plea to authors of extensions like this
Not trying to be snarky or anything but... the source code is available. If there's something that you really need, please consider contributing. That goes for any open-source project.
But they have a valid point that many things could be more useful if they were thought more general.
I feel like software development could be significantly more efficient if all developers would work together and not against each other, or just with much more foresight. We have so many programs/code/libraries that do almost the same stuff. But then, we are already super efficient compared to what we could do 50 years ago.
For what it's worth, I wasn't going to respond, but the more I read back this reply, the more it chafes—maybe because I've bristled about similar replies in the past and I've tried many times to write a blog post about what I see happening here. It reminds me of a different but commonplace phenomenon that has led to the case where I no longer bother filing bugs against projects who host their bugtracker on GitHub because of the high-ish likelihood that it will get a reply in the form of a comment responding solely to an imagined subtext in my message—where the subtext is that my bug report is actually a support request. I attribute this to the bugtrackers in many projects being run so poorly that folks are even allowed to file support requests there (which is frustratingly common on GitHub) and that maybe because the reply originates from someone who lives in a world where all communication happens through subtext.
So intentional snarkiness or not, there's something in your comment that just doesn't comport with mine and the message in it. If I were directly addressing the author of this tool and, say, asking that it be changed or repackaged to solve some problem for me, then your reply would be on-target. But I'm not even using this extension, and that's not what my comment was. It was not a support request. Besides what I wrote, there was no subtext to be found, but if a person insisted on trying to root out some latent meaning from the words, then let it have been an observation about current approaches to modularity or the principle of least authority or the principle of least power. https://www.w3.org/DesignIssues/Principles.html
Not sure how often I'll use this in day-to-day coding. Just don't find myself encountering that many of these types of issues on a daily basis.
However, I am 100% for sure going to break this out when it comes time to do Advent of Code this year. Always spend tons of times debugging code where this will be awesome.
Advent of Code really might be a great use-case for this extension!
Anyways, I think the table, the plain text and the planned text-diff visualizer might be handy for day-to-day debugging, as they fix some issues with the watch window in VS Code (mainly displaying multiline-strings and lists of homogeneous objects or just being able to update the watched expression with a shortcut).
Comments (61) 22 threads
A main difference seems to be you have to tell vscode-debug-visualizer how/what to show in the code, whereas with ddd you either point-and-click or else run gdb/ddd commands like `graph display _variablename_`. I guess you could probably script the latter, but I like how vscode-debug-visualizer reifies what you're visualizing into the code itself instead of into a debugging session.
[0] https://www.gnu.org/software/ddd/ [1] https://en.wikipedia.org/wiki/ThoughtTreasure
[1] https://hediet.github.io/visualization/
EDIT: I see comments from the author below, where there's some version of this tool online, but it goes for other authors, too, and the ability to run it from a truly standalone, single-file viewer.
https://hediet.github.io/visualization/ https://github.com/hediet/visualization
Anyways, in case of this application, all visualizations together are like 20MB (the monaco editor is a significant part of it). Having them split up and only loading things one demand significantly increases startup time.
Also, base64-encoding all the binary resources is a little bit inefficient.
[1] https://www.mediaevent.de/font-in-css-einbetten/
We use http://Nx.dev to split up example apps and libs into separate packages. I have a “visualizer” package, a “devtools” (for use in browser), will potentially add an electron app etc later
Not trying to be snarky or anything but... the source code is available. If there's something that you really need, please consider contributing. That goes for any open-source project.
I feel like software development could be significantly more efficient if all developers would work together and not against each other, or just with much more foresight. We have so many programs/code/libraries that do almost the same stuff. But then, we are already super efficient compared to what we could do 50 years ago.
So intentional snarkiness or not, there's something in your comment that just doesn't comport with mine and the message in it. If I were directly addressing the author of this tool and, say, asking that it be changed or repackaged to solve some problem for me, then your reply would be on-target. But I'm not even using this extension, and that's not what my comment was. It was not a support request. Besides what I wrote, there was no subtext to be found, but if a person insisted on trying to root out some latent meaning from the words, then let it have been an observation about current approaches to modularity or the principle of least authority or the principle of least power.
https://www.w3.org/DesignIssues/Principles.html
I apologize for having jumped the gun here. I guess your reply was appropriate for a 'Show HN' thread, since these threads are feedback requests.
However, I am 100% for sure going to break this out when it comes time to do Advent of Code this year. Always spend tons of times debugging code where this will be awesome.
Anyways, I think the table, the plain text and the planned text-diff visualizer might be handy for day-to-day debugging, as they fix some issues with the watch window in VS Code (mainly displaying multiline-strings and lists of homogeneous objects or just being able to update the watched expression with a shortcut).
All comments shown.
Couldn't load more comments. Check your connection and try again.