java_visualize icon indicating copy to clipboard operation
java_visualize copied to clipboard

Tree-like output

Open AsafJosefMor opened this issue 8 years ago • 3 comments

Hi David,

I'm wondering, is there a way to make the frames output show by which frame has been called another frame? For example in recursion we'll get a tree-like frames structure. Is there an easy way for this task?

AsafJosefMor avatar Mar 02 '17 23:03 AsafJosefMor

This sounds cool but is not supported, though with some substantial work, someone could add this feature.

Right now, the visualizer only shows single instant in time: the execution is on some node of the tree and all of its parents (which is why there's a linear stack, which is that linear sequence of nodes). The work involved would be to merge all of these snapshots together into a tree. The frames don't have unique identifiers, but if each call and return is identified, this should provide the necessary information in principle.

daveagp avatar Mar 03 '17 00:03 daveagp

Thanks David. If I want to keep the frames presented, so it won't disappear after a certain code line was executed. Is there a way to make it so?

AsafJosefMor avatar Mar 14 '17 09:03 AsafJosefMor

It has been a while since I worked on the detailed level of the code. The json is created by the code mentioned here: https://github.com/daveagp/java_jail/tree/master/cp/traceprinter

The frontend is inside of the repo upon which you're commenting right now.

daveagp avatar Mar 15 '17 01:03 daveagp