I am trying to find a tool that analyzes code to auto-generate diagrams of my entire project, (dozen of files, thousand of methods, dozens of classes, etc).

I found https://pynsource.com/ but it only create diagrams of a single file, it doesn't retroactively analyze code and create diagrams of imported files, methods, etc.

So, to clarify: I want a tool that creates a massive diagram with all the hundred of classes/methods/files/stuff in my project.

What do you recommend? Does something like that even exists?


There are several such tools, one of the most commonly used being the combination of Doxygen with Graphviz.

Doxygen will analyse your code to create documentation for code written in any of:

  • C++,
  • C, Objective-C,
  • C#,
  • PHP,
  • Java,
  • Python,
  • IDL (Corba, Microsoft, and UNO/OpenOffice flavors),
  • Fortran,
  • VHDL, etc

Additionally, you can annotate your source code to structure and improve the documentation. It will optionally produce dot language files and invoke GraphViz to diagram the code relationships.

You do have configure your project to let Doxygen know where to find your installed GraphViz dot tool, (the bin directory of where you installed GraphViz) as can be done in the Dot page of the Expert view of DoxyWizard. DozyWazrd Expert-Dot

Both tools are free, gratis & open source and are available for numerous platforms.

  • Highly recommended! In fact, industry standard for many programming languages. You will get class diagrams, including inheritance, plus function call tress, plus much more, including annotated code, where you can click to see class/function/variable declaration & usage. Although you can get much of he latter from PyCharm Jan 6 '20 at 8:05
  • I use PyCharm, freaking great for code completion but I found it a bit too limited to analyze code for diagram connections. Or I'm retard and I don't understand it.
    – Saelyth
    Jan 6 '20 at 8:10
  • @Saelyth - I have used the above combination for many years now and it is awesome for multiple languages and highly complex projects - you have to play about with the settings a bit to get exactly what you want - I suspect you will need to use the node count and depth settings on the above page (scrolling down a bit). Jan 7 '20 at 6:06
  • I love DOxygen, and it's excellent for the class/module/etc documentation, but are their any tools which make an effort to create diagrams of the control flow? Jan 7 '20 at 10:20
  • 1
    Thanks, @SteveBarnes - I've put up a new question! Jan 9 '20 at 9:38

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.