One of the most useful things I once have done was my application draw the graphs ...
In an application that had a complicated data structure specialized to the job (standard hashtable didn't do in that case ;-) I had my application output a ".dot" script that dot tool of graphviz could parse.
It did this by having a dump routine (okay, method, it was C++) that output the .dot header
digraph g {
then walked my data structure and then wrote the footer
}
In the structure walk it wrote every pointer with
SOURCE -> DESTINATION
where Source was the memory address of the referencing object preprened with O (O213435354) and Destination was the object pointed to in the same format.
At the start of every object it also wrote
SOURCE [ .... ]
with ... being the object data.
Whenever the application was at an "intersting" state I dumped the graph and then used the dot-tool from graphviz to visualize it. I have found a lot of pointer error quite easily that way, the eye is built to see regular structures in lines ...
By the way I still regularily use graphviz as it is quite nice to write & edit graphs with the text editor and let the tool vizualize them afterward. If I need to dress up .dot graphs for a powerpoint-spoiled audience, I load them into OmniGraffle on my mac. (And my PC-using coworkers think I have some diagramming superhero powers because with that combination I produce graphs 10 times faster than them when they use Visio)