CLion 2018.1 Help

Creating and Viewing Doxygen Documentation

Doxygen-style comments can be placed across the source code and used for generating full-fledged documentation in various formats. In case you have a project documented this way, you can easily run Doxygen tool from the built-in terminal in CLion to get the documentation. Besides, CLion enables you to get more value out of the Doxygen comments inside the IDE itself.

CLion includes the information from the Doxygen-styled comments into the Quick Documentation pop-up (Ctrl+Q):

cl doxygen

Viewing documentation

Doxygen-styled information is included in Quick Documentation pop-up in addition to the type information. To invoke the documentation pop-up:

  1. Place the caret at the desired symbol or at the @param command of the Doxygen comment.
  2. Press Ctrl+Q.

Alternatively, when the checkbox Show quick doc on mouse move in the editor settings is selected, just move your mouse pointer over the desired symbol.

If function parameters are documented separately from the function description, CLion will merge all the comments and show you the full function’s signature documentation (the same way as Doxygen does when generating the output):

cl doxygen 2

Creating comments from scratch

To create a Doxygen comment from scratch:

  1. Type one of the following symbols: ///, //!, /** or /*! and press Enter.
  2. You will get a stub to fill with the documentation text:
    cl doxygen stub

Reliable rename

While renaming a function or its parameters, the Doxygen comments need to be updated accordingly. In case of Rename refactoring, CLion updates Doxygen comments along with other references.

Before:

cl dox rename before

After:

cl dox rename after

Typing assistance

Basic typing assistance for Doxygen commands is provisioned by CLion auto-complete feature:

cl dox codecompletion
Note that not all the commands are available in the completion. Here you can find the list of the commands that are currently unsupported.

Last modified: 24 July 2018

See Also