views:

1545

answers:

6

What is the best documentation generator? I want to something that will easily add templates for documenting functions, classes, etc. I know there are several tools out there -- from Visual Studio plugins to external applications that take code files as input.

  • which is the best? (If language-specific, specify)
  • are there any documentation tools that could be used for multiple languages (e.g. VB.net and JavaScript)

Bonus points if they're free / open source.

+11  A: 

http://www.stack.nl/~dimitri/doxygen/ is probably a good place to start.

From the site: "Doxygen is a documentation system for C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D."

For JavaScript, there's http://jsdoc.sourceforge.net/, but it's not multi-language.

For VB.NET, there's http://vbdox.sourceforge.net/, also not multi-language.

Nick Brosnahan
I accepted this answer because it was thorough but I really would still like to see a single solution for both .net and JS
pc1oad1etter
+5  A: 

I really like Doxygen. It works for "C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D."

It supports several output formats, and it will also generate hierarchical and "call" charts, using the dot program.

Ryan Fox
A: 

I use Doxygen too. I even created a shortcut to document methods with ctrl+shift+d in VAX.

graham.reeds
+2  A: 

There are several good options, but I also cast a vote for Doxygen.

Christian Hagelid
+3  A: 

As others have said, Doxygen is probably your best bet. It works across many different languages, and just as importantly, it works with a number of different commenting styles.

For example, in C# you can continue to use the xml documentation in order to get the intellisense benefits that come with it as well as the ability to also use other tools such as the sandcastle help file builder. In other languages, you're still free to use more concise styles.

It can generate output in a number of different ways, including html, man page, ps, pdf (with LaTex), and a few others, I believe.

A: 

I vote for Doxygen as well. I am using Doxygen for C#.NET and it generates class diagrams, inheritance diagrams, etc. Here is an informative blog post.

Kevin P.