Breathe is a Sphinx plugin that provides a bridge between the Sphinx documentation system and Doxygen's XML output. It allows users to integrate Doxygen's comprehensive technical documentation of C, C++, and other languages directly into Sphinx-generated documentation, offering an 'autodoc'-like experience for non-Python projects. The current stable version is 4.36.0, with releases typically occurring a few times a year to maintain compatibility with Sphinx and Doxygen updates.
pip install breatheVerified import paths — ran on the pinned version, not inferred.
To use Breathe, first configure Doxygen to generate XML output (`GENERATE_XML = YES`). Then, in your Sphinx `conf.py`, add `breathe` to your `extensions` list and configure `breathe_projects` to point to your Doxygen XML output directory. Finally, use Breathe's reStructuredText directives (e.g., `.. doxygenclass::`, `.. doxygenfunction::`) in your `.rst` files to include the Doxygen documentation.
Upgrade Python to 3.9+ or pin `breathe<4.36.0` (e.g., `breathe==4.35.0`) if Python upgrade is not feasible.
Upgrade Sphinx to 7.2+ or pin `breathe` and `sphinx` to mutually compatible older versions.
Ensure your Doxyfile contains `GENERATE_XML = YES` and that Doxygen is run to produce the XML files in the directory specified by `breathe_projects`.
Double-check that the paths in `breathe_projects` correctly point to the Doxygen XML output directories and that the project names used in directives (e.g., `:project: myproject`) match the keys in `breathe_projects`.
Always pin to a specific major/minor version (e.g., `pip install 'breathe<5'`) or a precise version (`pip install breathe==4.36.0`) to avoid inadvertently upgrading to pre-release versions.