Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsJul 7, 2026·3 min de lecture

Doxygen — Documentation Generator for C++, C, Java, and More

The de facto standard tool for generating API documentation from annotated source code, producing HTML, LaTeX, PDF, and man pages from specially formatted comments.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Doxygen Overview
Commande d'installation directe
npx -y tokrepo@latest install f430e4ae-7a47-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

Doxygen is the standard documentation generator for C++, C, Objective-C, Java, Python, and several other languages. It extracts specially formatted comments from source code and produces browsable HTML documentation, LaTeX output for PDF generation, man pages, and XML for further processing. It has been the go-to tool for API documentation in systems programming for over two decades.

What Doxygen Does

  • Parses source code comments in Javadoc, Qt, or backslash-style formats
  • Generates cross-referenced HTML documentation with syntax-highlighted source listings
  • Produces LaTeX output that can be compiled into high-quality PDF manuals
  • Creates class inheritance diagrams, collaboration graphs, and call graphs via Graphviz
  • Supports multiple languages including C, C++, Java, Python, Fortran, and C#

Architecture Overview

Doxygen is a single C++ binary that preprocesses source files, parses comment blocks against a grammar of documentation commands, and emits output through pluggable generators. The HTML generator produces a static site with JavaScript-powered search. The XML generator outputs structured data for custom post-processing. Graphviz is invoked as a subprocess for diagram generation.

Self-Hosting & Configuration

  • Install from system package managers on Linux, macOS, and Windows
  • Generate a default Doxyfile with doxygen -g and customize project settings
  • Set INPUT to your source directories and FILE_PATTERNS to the relevant extensions
  • Enable HAVE_DOT and set DOT_PATH to generate class and call graphs with Graphviz
  • Integrate into CI pipelines by running doxygen Doxyfile and publishing the html directory

Key Features

  • Supports over a dozen programming languages from a single tool
  • Generates interactive HTML with full-text search, class hierarchy browsers, and source cross-references
  • Produces publication-quality PDF output via LaTeX
  • Automatic diagram generation for class hierarchies, collaboration, and call graphs
  • Extensive configuration with over 300 options in the Doxyfile

Comparison with Similar Tools

  • Sphinx — Python-centric, RST-based documentation; Doxygen excels at C/C++ API docs from source comments
  • Javadoc — Java-only; Doxygen handles Java plus many other languages
  • Breathe — bridge between Doxygen XML and Sphinx for combined docs; not a standalone generator
  • Standardese — modern C++ doc generator; Doxygen has a much larger ecosystem and broader language support

FAQ

Q: What comment formats does it support? A: Javadoc-style (/** /), Qt-style (/! */), and triple-slash (///) formats are all supported.

Q: Can it document Python code? A: Yes. Doxygen can parse Python docstrings, though Sphinx is more commonly used in the Python ecosystem.

Q: How do I generate PDF output? A: Enable GENERATE_LATEX in the Doxyfile, run doxygen, then compile the LaTeX output with pdflatex or make in the latex directory.

Q: Does it support Markdown? A: Yes. Markdown is supported in documentation comments and can be used for standalone pages.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires