{"id":25740,"date":"2020-03-26T20:43:36","date_gmt":"2020-03-26T20:43:36","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=25740"},"modified":"2020-03-26T20:43:36","modified_gmt":"2020-03-26T20:43:36","slug":"doxygen-and-xml-doc-comment-support","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/doxygen-and-xml-doc-comment-support\/","title":{"rendered":"Doxygen and XML Doc Comment support"},"content":{"rendered":"<p>Whether you\u2019re using Doxygen or XML Doc Comments, <a href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\">Visual Studio version 16.6 Preview 2<\/a> provides automatic comment stub generation as well as Quick Info, Parameter Help, and Member List tooltip support.<\/p>\n<h2>Stub Generation<\/h2>\n<p>By default, the stub generation is set to XML Doc Comments. The comment stub can be generated by typing a triple slash (\/\/\/) or by using the documentation generation shortcut (Ctrl+\/) above the function.<\/p>\n<h5><strong>XML Doc Comment<\/strong><\/h5>\n<h5><img decoding=\"async\" class=\"alignnone size-full wp-image-25741\" style=\"font-size: 1rem;\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2020\/03\/quadraticXMLgen.gif\" alt=\"Image quadraticXMLgen\" width=\"1172\" height=\"572\" \/><\/h5>\n<h5><strong>Doxygen<\/strong><\/h5>\n<p>To switch to Doxygen, type \u201cDoxygen\u201d in the Ctrl+Q search box, or go to <em>Tools &gt; Options &gt; Text Editor &gt; C\/C++ &gt; <\/em><em>&gt; General<\/em>, and choose your preferred documentation style:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-25743\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2020\/03\/documentationOptions.png\" alt=\"Image documentationOptions\" width=\"1059\" height=\"724\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2020\/03\/documentationOptions.png 1059w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2020\/03\/documentationOptions-300x205.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2020\/03\/documentationOptions-1024x700.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2020\/03\/documentationOptions-768x525.png 768w\" sizes=\"(max-width: 1059px) 100vw, 1059px\" \/><\/p>\n<p>Once specified, you can generate the comment stub by typing the respective \u201c\/\/\/\u201d or \u201c\/**\u201d above a function, or by using the (Ctrl+\/) shortcut.<\/p>\n<p>You can also specify this documentation option on a per-folder or per-file basis via .editorconfig files with the corresponding setting:<\/p>\n<pre class=\"toolbar:2 show-lang:2 lang:default decode:true\">vc_generate_documentation_comments = none<\/pre>\n<pre class=\"toolbar:2 show-lang:2 lang:default decode:true\">vc_generate_documentation_comments = xml<\/pre>\n<pre class=\"toolbar:2 show-lang:2 lang:default decode:true\">vc_generate_documentation_comments = doxygen_triple_slash<\/pre>\n<pre class=\"toolbar:2 show-lang:2 lang:default decode:true \">vc_generate_documentation_comments = doxygen_slash_star\r\n<\/pre>\n<p>To get started, you can have Visual Studio generate an .editorconfig file for you based on your existing setting for documentation by using the \u201cGenerate .editorconfig file from settings\u201d button shown in the screenshot above.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-25742\" style=\"font-size: 1rem;\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2020\/03\/QuadraticDoxygen.gif\" alt=\"Image QuadraticDoxygen\" width=\"1172\" height=\"572\" \/><\/p>\n<h2>Tooltip Display<\/h2>\n<p>Documentation artifacts will now appear in Quick Info, Member List, and Parameter Help tooltips:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-25756\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2020\/03\/tooltips.gif\" alt=\"Image tooltips\" width=\"782\" height=\"282\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>Give us your feedback<\/h2>\n<p>Download<a href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\">\u00a0Visual Studio 2019 version 16.6 Preview\u00a02<\/a> today and give this new documentation support a try. We can be reached via the comments below,\u00a0email (<a href=\"mailto:visualcpp@microsoft.com\">visualcpp@microsoft.com<\/a>), and Twitter (<a href=\"https:\/\/twitter.com\/visualc\">@VisualC<\/a>). The best way to file a bug or suggest a feature is via\u00a0<a href=\"https:\/\/developercommunity.visualstudio.com\/spaces\/8\/index.html\">Developer Community<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Whether you\u2019re using Doxygen or XML Doc Comments, Visual Studio version 16.6 Preview 2 provides automatic comment stub generation as well as Quick Info, Parameter Help, and Member List tooltip support. Stub Generation By default, the stub generation is set to XML Doc Comments. The comment stub can be generated by typing a triple slash [&hellip;]<\/p>\n","protected":false},"author":329,"featured_media":25742,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-25740","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus"],"acf":[],"blog_post_summary":"<p>Whether you\u2019re using Doxygen or XML Doc Comments, Visual Studio version 16.6 Preview 2 provides automatic comment stub generation as well as Quick Info, Parameter Help, and Member List tooltip support. Stub Generation By default, the stub generation is set to XML Doc Comments. The comment stub can be generated by typing a triple slash [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/25740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/329"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=25740"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/25740\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/25742"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=25740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=25740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=25740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}