C# Call Graph Generation Tool

C# Call Graph Generation Tool

温柔少女心 发布于 2021-11-28 字数 731 浏览 959 回复 8 原文

I just got a heaping pile of (mostly undocumented) C# code and I'd like to visualize it's structure before I dive in and start refactoring. I've done this in the past (in other languages) with tools that generate call graphs.

Can you recommend a good tool for facilitating the discovery of structure in C#?


In addition to the tools mentioned here I've seen (through the tubes) people say that .NET Reflector and CLR Profiler have this functionality. Any experience with these?

如果你对这篇文章有疑问,欢迎到本站 社区 发帖提问或使用手Q扫描下方二维码加群参与讨论,获取更多帮助。



需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。


裸钻 2022-06-07 8 楼

I'm not sure if it will do it over just source code, but ANTS Profiler will produce a call graph for a running application (may be more useful anyway).

夏夜暖风 2022-06-07 7 楼

SequenceViz and DependencyStructureMatrix for Reflector might help you out: http://www.codeplex.com/reflectoraddins

梦初启 2022-06-07 6 楼

Visual Studio 2010.

Plus, on a method-by-method basis - Reflector (Analyzer (Ctrl+R); "Depends On" and "Used By")

像你 2022-06-07 5 楼

I've used doxygen to some success. It's a little confusing, but free and it works.

哽咽笑 2022-06-07 4 楼

As of today (June 2017), the best tool in class is Resharper's Inspect feature. It allows you to find all incoming calls, outgoing calls, value origin/destination, etc.

The best part of ReSharper, compared to other tools mentioned above: it's less buggy.

酒儿 2022-06-07 3 楼

It's bit late, but http://sequenceviz.codeplex.com/ is an awesome tool that shows the caller graph/Sequence diagram. The diagrams are generated by reverse engineering .NET Assemblies.

再浓的妆也掩不了殇 2022-06-07 2 楼

Concerning NDepend, it can produce some usable call graph like for example (image full size here)

alt text

Find more explanations about NDepend call graph here.

别靠近我心 2022-06-07 1 楼

NDepend is pretty good at this. Additionally Visual Studio 2008 Team System has a bunch of features that allow you to keep track of cyclomatic complexity but its much more basic than NDepend. (Run code analysis)