How to change visual studio's default output for the code commenting template generated from '///'

Viewed 168

First off, I've only found one similar question on stackoverflow which is from 10+ years ago, please don't reference that question if this gets marked redundant.

Next, I am not sure whether this feature is from VS or an extension I may have installed.

The question is, when I type in '///' I get the following default framework for adding header comments:

/// <summary>
/// 
/// </summary>
/// <param name="sample_input"></param>
/// <param name="sample_output"></param>
/// <returns></returns>

How can I change this to the format I'm more used to using for Doxygen, similar to this?

/*
** @brief
** @param
** @return
*/

In addition to asking how to change this default behavior, I'd like to know if the 1st format shown above is Doxygen friendly.

Edit: some helpful answers and links, but I'd still like to generate the doxy comments to use the convention with asterisks instead of '///' to begin each line.

1 Answers

If you use "Visual Studio 2019" started from "v16.6" follow those steps:

To switch to Doxygen, go to Tools > Options > Text Editor > C/C++ > General, and choose your preferred documentation style:

Once specified, you can generate the comment by typing the respective /// or /** above a function, or by using the (Ctrl+/) shortcut.

The final result will be:

Quoted from: Here

Related