Debugger Visualizer for Visual Studio
Recently, I have been playing with implementing a Visual Studio add-in that displays your data structures as graphs live as you debug.
The graph on the right shows current state of the data structure being watched. The graph updates as you step through the code.
Here is an example of more complex structure:
The layout is done using GLEE graph layout engine, which could be possibly replaced by Graphviz or something else.
As I was suspecting prior to the implementation, there is an important issue that needs to be solved: when the user does a step in the debugger, the object graph is rebuilt from scratch and the layout engine calculates new layout. However, even if the graph changes only slightly, it can sometimes affect the layout significantly and therefore confuse the user.
I am currently thinking about matching nodes from current step to the nodes from the previous step (provided the graph doesn't change that much between steps, which is typically true - and when it chages too much, we don't mind layout changes anyway). The matching of the two graphs could be used to preserve the layout until the nodes really have to move. And if they have to move, move them in a way that they preserve relative positions to each other. There is a space for some interesting algorithms here.
Current source code of the add-in is available here.
5 comments:
cool !!!
It looks great! How do I use it ? I built the project, now what do I do with the DLLs ?
Hi, I'm not sure this will still work with the latest version of VS. To install the DLL, please follow: http://msdn.microsoft.com/en-us/library/sb2yca43.aspx
You can also simply "Run" or "Debug" the solution: a new instance of VS is started, with the visualizer installed.
Thanks Martin, I tried it - doesn't work. I guess it's not compatible with VS2012
Thank you for sharring this
Post a Comment