Automatically Generating doxygen Documentation in Visual Studio

less than 1 minute read

To automatically generate doxygen HTML documentation for your classes after a build, complete the following steps.

  1. Download the binary distribution of doxygen for Windows.
  2. Create a folder docs within the main project.
  3. Execute the following command to generate a doxygen configuration file. (Put it in the docs folder.)
    doxygen -g CustomList.doxygen
  4. Set the following variables in the doxygen configuration file: PROJECT_NAME, OUTPUT_DIRECTORY, EXTRACT_ALL, EXCLUDE, GENERATE_LATEX
  5. Add the following line to the “Post-build event command line” text box under the project’s build events.
    doxygen $(ProjectDir)docs\$(ProjectName).doxygen
  6. Rebuild your project.

Relevant Variables

Variable Name (Tag) Description Default For Exploring
PROJECT_NAME Single word (or sequence of words in double quotes) that identifies project    
OUTPUT_DIRECTORY Relative or absolute directory into which documentation will be written    
EXTRACT_ALL Whether to document all entities NO YES
EXTRACT_PRIVATE Whether to include private members NO YES
EXTRACT_PACKAGE Whether to include package members NO YES
EXTRACT_STATIC Whether to include static members NO YES
INPUT Files and/or directories that contain documented source files, separated with spaces.    
RECURSIVE Whether subjectories should be searched for input files NO YES
GENERATE_LATEX Whether to generate LaTeX output YES YES