๐Ÿ“˜

Doxygen

Doxygen is an open-source code documentation generator originally written by Dimitri van Heesch. It parses specially-formatted comment blocks directly inside your C, C++, Java, or Python source files and automatically builds browsable HTML (or LaTeX/PDF) API reference documentation from them. It sits around #16 among documentation tools at roughly 4.3% usage share, and teams reach for it specifically because the docs live next to the code they describe and stay in sync as the code changes.

Quick facts
Type: Code documentation generator (parses source comments into API reference docs)
Made by: Dimitri van Heesch (open-source project)
Cost: Free / open-source
Best for: C/C++/Java/Python codebases that need auto-generated, always-current API reference documentation
Primary use case: Turning inline source comments into browsable API documentation websites
Jump to: ExampleGetting startedBest for

Example

Doxygen reads specially-marked comment blocks (starting with /**) that use tags like @brief, @param, and @return to describe a function.

/**
 * @brief Computes the shipping cost for an order.
 *
 * @param weightKg   The package weight in kilograms.
 * @param destZip    The destination ZIP/postal code.
 * @return double     The computed shipping cost in USD.
 *
 * @note Throws std::invalid_argument if weightKg is negative.
 */
double computeShippingCost(double weightKg, const std::string& destZip) {
    if (weightKg < 0) {
        throw std::invalid_argument("weight cannot be negative");
    }
    return weightKg * 2.5 + zoneRateFor(destZip);
}

Getting started

Install Doxygen, generate a default config file, then point it at your source directory and run it to produce an HTML docs site.

# generate a default Doxyfile config in the current directory
doxygen -g

# edit Doxyfile: set INPUT = ./src  and  GENERATE_HTML = YES

# run it โ€” produces html/index.html with your full API reference
doxygen Doxyfile
Best for: Library and systems-level codebases (C/C++ especially) where the API surface is large and documentation must stay tightly coupled to, and versioned with, the actual source comments.