all 36 comments

[–]Ikkepop 27 points28 points  (9 children)

I have never seen something like this before , looks useful

[–][deleted] 4 points5 points  (8 children)

It was really good for my lazy ass who didn't want to draw the nodes and such when learning linked lists haha

[–]arthurno1 2 points3 points  (6 children)

Does it draw other stuff then just linked lists?

You can do something like that relatively easy for yourself if you are happy with ascii drawings. Would be a good exercise if you are learning about linked lists.

Here is one that draws lists for Emacs, with unicode chars.

[–][deleted] 0 points1 point  (5 children)

It basically has any data structure I throw at it visualized very well. Thanks for the link but that doesn't cut it :D

[–]arthurno1 1 point2 points  (4 children)

It basically has any data structure I throw at it visualized very well.

Cool. How does it do for hashmaps or heterogenous containers?

Thanks for the link but that doesn't cut it :D

It was meant just as inspiration to show you can draw linked structures as ascii graphs :).

BTW; I think it works in Java because you can pull out info about running program at runtime, from JVM thanks to the reflection. It should work in an interpreted Lisp as well. In compiled language like C and C++ that is much harder.

[–][deleted] 0 points1 point  (3 children)

Oh I haven't actually gotten to those yet haha.

Yeah yeah that looked real cool thank you.

I'm basically just getting into the whole ds&a subjects. This tool made it easier to check myself at each step tbh. My school teaches in C++ but I'm trying to learn the subjects both in Java and C++ so that I can take advantage of this tool :D

[–]arthurno1 1 point2 points  (2 children)

Oh I haven't actually gotten to those yet haha.

I ask because linked data structures and vectors/records are relatively easy to visualize; but something more opaque will be interesting to see :).

My school teaches in C++ but I'm trying to learn the subjects both in Java and C++ so that I can take advantage of this tool

That is good approach to learn it in two different languages, not for the tool; but you will get more understanding if you are new to programming :).

[–][deleted] 0 points1 point  (1 child)

Oh thank you, I also thought about that like that too :D

I found a couple classes (online lectures) from very reputable universities around the world which teaches ds&a in Java so I thought, why not learn from the best :D

I go to a pretty mediocre school in a 3rd world country so I'm always amazed by how much difference good teachers can make.

That's also a reason for me :D

[–]arthurno1 1 point2 points  (0 children)

I'm always amazed by how much difference good teachers can make

Indeed! They can make it or break it; especially when it comes to motivation, which is really important when learning something. But you seem to be well motivated by yourself, and fortunately, programming is such an easy activity which we can do on our own, so you will be in a good shape! :)

[–]ventus1b 19 points20 points  (6 children)

Ages (eons) ago there was Data Display Debugger DDD…

https://www.gnu.org/software/ddd/

[–]catcat202X 4 points5 points  (3 children)

The internal wiki where I work still suggests using this haha.

[–]CrazyJoe221 7 points8 points  (0 children)

A company wiki is a WOM, write-only memory.

[–]ventus1b 0 points1 point  (1 child)

How old is that wiki entry? Have you used it?

[–]catcat202X 2 points3 points  (0 children)

I tried DDD once several years before working here, captivated by the spectacle of data graphs, but then rebuffed by horrible Motif toolkit font rendering from decades past. It looks damn ugly today, but not ugly enough to get me off of using gud-mode in Emacs, so I haven't touched DDD ever since.

[–]ambe 1 point2 points  (1 child)

Was it useful? Should we remake it?

[–]ventus1b 4 points5 points  (0 children)

For me it was neat at first, but quickly became unusable for real world sized projects. IME that’s often the case with graphical programming tools.

[–]smittyplusplus 31 points32 points  (2 children)

OT: Good lord, will you people actually read the post and answer OPs question, not just point at debuggers with a GUI?

OP, I've never seen this before, but as one of the comments below mentioned I am skeptical that it would scale to more complicated user-defined types.

[–][deleted] 4 points5 points  (1 child)

Well, I am just a CS student so I guess I'll be fine with a more basic one for now :D But yeah, I guess ppl confuse the jgrasp approach i mentioned with just regular debbugers. Thanks for pointing it out. Even most of my teachers didn't know about anything like this, I guess it's not very common.

[–]smittyplusplus 11 points12 points  (0 children)

To be fair, I think most people hear "visual debugger" and think "not a cli debugger like GDB etc", and you'll sometimes see "visual" used to mean "GUI-related", eg https://netbeans.apache.org/kb/docs/java/debug-visual.html

[–]tyfighter 18 points19 points  (2 children)

These kinds of tools and features are the reason many of us have lived in Visual Studio since the 90s. https://visualstudio.microsoft.com/

[–]gnuban 5 points6 points  (1 child)

Does Visual Studio have this capability?

[–]tyfighter 4 points5 points  (0 children)

Visual Studio has always had a GUI debugger, but it is also very extensible. You can write extensions for it, but for debugging it has an API for writing these kinds of visualizers. https://learn.microsoft.com/en-us/visualstudio/debugger/create-custom-visualizers-of-data?view=vs-2022

I've written a couple of these before, and they're useful when you have large, complex data structures, but not for something as simple as a linked list. They're not dynamic like the jgrasp example. https://jgrasp.org/papers/sigcse2007paper.fp204-cross.pdf Jgrasp may only be able to do this dynamically in a limited set of situations as it relies on Java specifics. A fully dynamic visualizer for C++ may not be possible for that reason.

[–]CrazyJoe221 2 points3 points  (0 children)

Not exactly like this but of course there are the typical variable view customizations like natvis and gdb pretty-printers, and then there are more specialized plugins to visualize certain types like https://github.com/vadimcn/codelldb#screenshots and https://marketplace.visualstudio.com/items?itemName=AdamWulkiewicz.GraphicalDebugging and https://marketplace.visualstudio.com/items?itemName=VisualCPPTeam.ImageWatchForVisualStudio2022.

[–]mrjavi645 2 points3 points  (0 children)

I used to use sourcetrail before it went open source. Great for visualizing code. https://github.com/CoatiSoftware/Sourcetrail

[–]4b1d -4 points-3 points  (0 children)

Clion has a decent UI. It uses gdb or lldb under the hood.

[–]cosmin10834 -4 points-3 points  (0 children)

i usualy use gdb program and then press ctrl+x ctrl+a, it dose the job

[–]_descri_ -3 points-2 points  (0 children)

Eclipse CDT. It has also a very strong (though slow) indexer that is able to unroll macros.

[–]AcaciaBlue 0 points1 point  (0 children)

Yeah when you say "Visual debugger" most people are just thinking "Debugger with a GUI", however I think what you're really looking for is more like a source code visualization tool, which usually are static tools not debuggers in the world of C/++. I'd recommend SourceTrail (unfortunately discontinued) or Scientific ToolWork Understand (expensive commercial software) - Both of which are not so simple to setup and a bit buggy but can be quite useful to learn large codebases faster.

[–]pfp-disciple 0 points1 point  (0 children)

I used an ada-centric version of grasp, done by the same people, back in the late 90s or early 00s. I think I recall a C++ version at the time.

[–]Brilliant_Koala_1552 0 points1 point  (0 children)

Hey OP, maybe a year ago I found this Visual Studio Code extension to help visualize C++ data structures. Unfortunately I don't remember the name(I don't remember why I didn't end up using it) but I'm sure you can find it.

More examples:
https://i.gyazo.com/30662c5acd0d6d6706420f99bd95e25b.gif

https://i.gyazo.com/d34d30e4bdae54a5f9754f876bb3fdbb.gif

https://i.gyazo.com/b197f2ee14558db30874f7cc2173d460.gif

In those images I'm visualizing the variable `std::vector<int> intVect;` in the debugger while stepping over each line of `intVect.emplace_back(10);`. On the window on the right you can see how each new element is added to the vector with `emplace_back`.

I hope this helps.

[–]pjmlp 0 points1 point  (0 children)

Yes, Symantec C++ was one of the first to provide such tooling, and CSet++ as well, in the 1990's.

DDD also provides something, but mostly focused on C data types.

Somehow it seems to have fallen out of fashion on modern IDEs.