question

DimaK-2124 avatar image
0 Votes"
DimaK-2124 asked DimaK-2124 edited

Usual comment above the line of code in C++ VS 2019 / Exclude comment from intellisense quick info

Is there any way to make the comment line above the line of code being not included into Intellisense and not appear as quick info?
The tutorial I'm watching (it uses VS 2017) says its "//" for documenting, "///" for usual commenting. As for my VS 2019 testing "//" and "///" both trigger intellisense. Couldn't find the customization settings for that..

UPD2: I posted at VS Developer Community as @PengGe-MSFT suggested. Vote here if you want to make it a feature.

UPD: so it actually works in VS 2015. But what about VS 2019 and 2022 ? :)
140416-vs2015-commenting.png




vs-generalc++
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, @DimaK-2124
I checked the documentation and setting options of Visual Studio 2019, but did not find the relevant settings.
I suggest you directly suggest this feature to Visual Studio Product Team in our Developer Community, and if you do suggest this feature, please share the link here, other forum members who are interested or needed this feature will go to vote for this thread.


1 Vote 1 ·
DimaK-2124 avatar image DimaK-2124 PengGe-MSFT ·

Thank you for the suggestion. I posted in the feature section there.

0 Votes 0 ·
RLWA32-6355 avatar image
1 Vote"
RLWA32-6355 answered RLWA32-6355 commented

If you include a blank line between the comment and the related code then the comment will not be included with the IntelliSense Quick Info.

For example -

With blank line -
140221-with.png

Without blank line -
140213-without.png



with.png (12.1 KiB)
without.png (15.2 KiB)
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I see what you mean. Thanks. Though any way without adding a blank line?

0 Votes 0 ·

I didn't find any setting in the IntelliSense options to control inclusion/exclusion of user comments as part of Quick Info

0 Votes 0 ·

I think it's possible that the tutorial you were using was speaking to XML comments that are used with C#. See generate-xml-documentation-comments


0 Votes 0 ·
DimaK-2124 avatar image DimaK-2124 RLWA32-6355 ·

I'm not sure what you're talking about. Though tutorial clearly stated that triple slash comment prevents code below from getting "the comment and documentation of what's above" - I don't know if that's not a mistake by the lecturer - he uses VS 2017 or 2015 and doesn't demonstrate how things dissapear from quick info after adding the third slash.

0 Votes 0 ·
Show more comments
RLWA32-6355 avatar image
1 Vote"
RLWA32-6355 answered RLWA32-6355 commented

I dusted off some old stuff and fired up copies of VS2015 and VS2017. And yes, in these older versions of VS the /// comment in C++ source code was not shown in IntelliSense Quick Info . However, apparently this is no longer the case in VS2019.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your feedback!

0 Votes 0 ·

You're welcome. Some food for thought - was the exclusion of /// comments from IntelliSense Quick Info a feature or a bug? Did VS2019 fix an old bug or create a new one? :)

0 Votes 0 ·