16

When typing code, I really like the intellisense feature of Visual Studio 2010 (Professional), especially that I am able to look up XML comments of types in use. (See Documentation from Microsoft). This works so far. However, the remarks section of XML code comments does not show up.

I would consider this an extremely useful feature, since there is often useful information that can not get easily guessed from the summary. (Which is why we have a the remarks section, i guess)

How to explore the remarks portion in Visual Studio 2010 (Professional) at the intellisense level? (I use DevXpress Coderush, if that matters, but I don't think so).

ThinkingStiff
  • 64,767
  • 30
  • 146
  • 239
Marcel
  • 15,039
  • 20
  • 92
  • 150
  • This could easily produce unwieldy IntelliSense tooltips. The `` section is not intended to be displayed from IntelliSense, and instead to contain information that does not need to be immediately at hand. You can read the remarks from the Object Browser or the actual documentation that you generate automatically from the XML comments. – Cody Gray - on strike Dec 27 '11 at 14:34
  • @CodyGray: Yeah, but I would have to search for the type in the object browser window. This is so annoying, considering, that I already have "determined in code" what type I want to have information on. Or did I overlook a feature in object browser like "track type on cursor" or something? – Marcel Dec 27 '11 at 14:39
  • 1
    The `F12` key automatically shows the source (if available) of the selected object, or displays it in the Object Browser. (Well, actually, that depends on your selected VS settings. More info [here](http://stackoverflow.com/questions/685897/shortcut-key-for-view-in-object-browser).) – Cody Gray - on strike Dec 27 '11 at 14:53
  • OK, that takes me to the comments... Consider to post that as answer. If there is no better solution, I will accept it. – Marcel Dec 27 '11 at 15:05
  • 5
    I wish there was an option to show remarks and return value description, if only because MS always fails to include essential information in the summary! The most typical case is whenever I encounter an unfamiliar collection class. For instance, the Dictionary getter indexer (what a term!) throws an exception if the key doesn't exist, but the summary doesn't mention it - only the remarks do. HashSet.Remove(T item) does not scream if the item does not exist (as one would expect given what hash sets are for, and the bool return value, but still). Stuff like that. – The Dag Dec 06 '12 at 18:45

2 Answers2

5

Visual Studio v16.6.5 has an option in "Text Editor > C# > Advanced > Editor Help", called "Show remarks in Quick Info". It was added very recently and was enabled by default, but I haven't found any release notes or documentation about it. I checked version 16.5.2 and it does not have such an option.

When enabled, Quick Info shows the remarks section after adding a paragraph separator (empty line). When there is no summary section, the paragraph separator still gets added before the remarks (not sure if that's intentional).

The returns section is now also similarly shown, after the remarks section, separated by the word "returns". But there does not appear to be an option to disable this one.

Andrius R.
  • 159
  • 1
  • 7
  • This is VS2019, and I need to update first, as this seems to be indeed very new! – Marcel Aug 03 '20 at 06:18
  • 1
    I checked, and it's indeed there, enabled by default. So, this makes this question obsolete for the future. I will, however, not change the accepted answer, because the question explicitly refers to an older VS version. You might consider creating a new (wiki) question with this answer to garner your well-deserved reputation for this good spot. – Marcel Aug 03 '20 at 06:36
  • I'm 99% sure that VS 2019 used to show the remarks by default even before this option setting was added (but I don't think it ever showed "returns"). Then in the past week or so, I noticed that it was no longer showing; I found the setting & the checkbox was checked for me. I unchecked it then re-checked it, and the remarks started showing again... – Tobias J Sep 16 '20 at 21:16
3

Put your cursor over the class/function/whatever that you want to see the full comments on, then press F12. Expand the comments section on the left of the editor pane.

Marcel
  • 15,039
  • 20
  • 92
  • 150
DFTR
  • 861
  • 10
  • 30
  • 1
    Thanks for your input. However, this is not what I was initially looking for, since I loose the current cursor position. I was looking for something to pop up while not leaving the editor. – Marcel Feb 22 '13 at 06:52
  • 1
    As was I. From an entire day of Googling, it looks like your only option is a custom piece put into resharper. I didn't look into that solution to far as that didn't work for me, mostly because I don't use resharper. – DFTR Feb 22 '13 at 15:29
  • It's the best solution (well, the only) solution that is of help, thus accepting it. – Marcel Mar 18 '14 at 07:23
  • 9
    Ctrl takes you back to your previous cursor position :) – NickG Aug 01 '14 at 08:28
  • The Resharper things is https://github.com/MrJul/ReSharper.EnhancedTooltip – CAD bloke Jul 25 '19 at 06:25
  • And this will not show you the remark but the remark-source. The source can include HTML entities whereas the remark "output" doesn't (well it correctly shows the characters of the entities e.g. `"=" | &=& | <=< | >=>` ) – MrCalvin Oct 14 '21 at 08:40