Tool to visualise code flow (C/C++) [closed]

2019-01-20 22:39发布

Do you have any sugestions of tools to ease the task of understanding C/C++ code? We just inherited a large piece of software written by others and we need to quickly get up to speed on it. Any advice on tools that might simplify this task?

16条回答
We Are One
2楼-- · 2019-01-20 23:00

Slickedit is great for navigating large blocks of code you don't know. The tags feature allows you to deal with the code on a functional basis, without having to deal with which file is it in. (EMACS actually has tags and is every bit as good as Slickedit, but with a slightly steeper learning curve)

When you get to a method or class or variable you don't understand, you just push-tag to go to that code, look it over, then pop-tag back. (those are bound to keystrokes, so it is very quick)

You can also use find-references to see where that function/variable is used.

Saves tons of time over having to go and figure out which file something is in.

查看更多
在下西门庆
3楼-- · 2019-01-20 23:01

Personally, I use the debugger. Run through the code and see what its doing, and where its going is the only way.

However, you can run it through some documentation-generators which (sometimes) help. A good example is doxygen.

查看更多
闹够了就滚
4楼-- · 2019-01-20 23:01

Doxygen will give you class relationship diagrams if you use graphviz, even if you haven't specifically prepared for it.

查看更多
冷血范
5楼-- · 2019-01-20 23:03

doxygen is a free doc-generating tool (similar to Javadoc) that will also produce relationship graphs as well.

查看更多
Evening l夕情丶
6楼-- · 2019-01-20 23:07

I personnaly use Visual Studio debugger tools.

It comes with the "Caller Graph" feature which will allow you to visualize stuff in little boxes. Also the Call Stack and the usual watch features are usually all I need

查看更多
不美不萌又怎样
7楼-- · 2019-01-20 23:08

i tried a tool named Visustin which is not very great graphically but does what it says: Flowchart from Code. http://www.aivosto.com/visustin.html

查看更多
登录 后发表回答