having recently joined a project with a vast amount of code to get to grips with, I would like to start documenting and visualizing some of the flows through the call graph to give me a better understanding of how everything fits together. This is what I would like to see in my ideal tool:
- every node is a function/method
- nodes are connected if one function can call another
- optional square box in between detailing conditions under which call is made (or a label icon you can hover over like a tooltip)
- also icon on edge describing parameters
- hover over node and description is displayed
- optional icons for node to display pseudo code
- scenario/domain view - display subset of complete diagram for particular use-case
- slide view mode - for each frame, the currently executing function is highlighted
- plenty of options over what to display to reduce on-screen clutter
the interactive use of such a tool is key, I'm not looking for a Graphviz type solution because there would be too much clutter. The ability to form a view of a subset of the entire graph would be very handy (maybe with the unimportant clutter greyed out). Don't need automatic generation from source code, happy to enter it manually.
Almost like a mind-map.
Does that make sense? If y开发者_开发知识库ou are not aware of such a tool, do you also think it would be useful? (Just in case I decide to go and scratch that itch one day!)
You don't mention the environment you're using, but if it's .NET, NDepend might come in handy.
To develop further the answer of Willem van Rumpt, with the tool NDepend, you can indeed obtain a call graph like this one. Disclaimer: I am one of the developers of the tool
For that you just need to export to the graph the result of a CQLinq code query:
Such a code query, can be generated actually for any method, thanks to the right-click menu illustrated below.
精彩评论