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?

1 Answer 1


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

  • 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. Commented Dec 12, 2019 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
    Commented Dec 12, 2019 at 19:04
  • Looks like Doxygen has some features for Python, but in the documentation on diagramming it only mentions C++. Doe this work at all for Python? Or is this feature still limited
    – Hofbr
    Commented Jun 4, 2021 at 4:15
  • Is this a new question, asking for "Doxygen for Python"?
    – Mawg
    Commented Jun 4, 2021 at 8:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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