1

Frequently, I come across large bodies of code and have to trace through the code to find out how each module is related and what the data flow is through the methods, etc.

To increase my debug efficiency, when I'm first assigned a project(body of code) as the maintainer, I run through every module, file, class, etc. and I plot them in a Visio diagram.

This is a tedious process in the beginning, but once I have the diagram complete, it becomes very easy to trace what is supposed to happen to the data to identify where the bugs might be.

Now I have been assigned a much larger body of code. Tedious is an understatement of the task of creating the diagram.

What I would like would be a tool that you can point it to a parent folder/directory and it could search through the file/folder structures and auto generate the diagram. (If it is able to pull out classes and methods that would be great, but for now, I would be happy with the include/dependency hierarchy.)

Alternatively, if I could point the program to a specific source file, and have it generate an inheritance/dependency tree from that source file that would be great.

I have found that Visual Studio 2019 Enterprise has something called Code Map. However, I do not have the Enterprise version. Is there a cheaper alternative for doing dependency graphs?

2

Doxygen can do exactly what you ask (and lots more), and it is free.

Take a look at some example output

enter image description here

| improve this answer | |
  • 1
    Looks promising, but having a difficult time getting the graphs to actually display. Trying to work through stackoverflow.com/a/8888911/11035837 to figure it out. – wolfsshield Dec 12 '19 at 15:44
  • 1
    I can't remember, but maybe you have to configure GraphViz? Sounds like you need a new question on superuser.com If that works, accept this answer. I not, look for an alternative, but DoxyGen is the industry standard – Mawg says reinstate Monica Dec 12 '19 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.