Visual studio auto complete Doxygen tags for C++

Viewed 11243

Is there a way to make visual studio automatically place the doxygen tags in a C++ source file ?

What I mean is for example this piece of code:

int foo(bool p);

If I type /// on top of it, Visual Studio automatically generates the following lines:

/// <summary>
/// 
/// </summary>
/// <param name="p"></param>
/// <returns></returns>
int foo(bool p);

My question is: is it possible to do the same with doxygen (when I type /**)? To make VS generate the following:

   /**
    * @brief
    * @param p
    * @return
    */
    int foo(bool p)

My question is about writing the documentation tags (not generating the final doxygen).

3 Answers

There is a setting in VS19 that does just that:

Tools > Options > Text Editor > C/C++ > CodeStyle > General > Generated documentation comments style

Set this to Doxygen (/**)

I don't know why this did not pop out on my search on Visual Studio Marketplace

For the VS2019 and VS2022 version there is another extension based on the CppDoxyCompletion, but with a few more features.

Related