Show exceptions in intellisense?

2020-04-11 06:26发布

问题:

I'm using Visual Studio 2013 Ultimate.

In the C# code editor, members that has documented exceptions can be listed through Intellisense:

My question is, how to add this useful feature for VB.Net?.

Is there a 3rd party extension to add it?.

Why this feature seems unavailable in VB.Net?.

Please note that I'm not asking how to add Xml documentation for a potential exception in a member, what I'm asking is how to enable Intellisense to show those exceptions, because the C# code editor can show exceptions on Intellisense (as seen in the image that I shared), but the VB.Net code editor seems CAN'T.

And not only my own documented exceptions, just I'm talking about those exceptions that are already documented in the members of .Net Framework class library (again as seen in the image that I shared).

回答1:

This window that shows information about the current programming construct is called quick info. For VB.NET, the quick info didn't and it can't show the exception list in any version of Visual Studio up to and including VS2015. For C#, as you already know, the exception list is shown but not in VS2015. The reason that VS2015 C# quick info doesn't show the exception list is simply because it's a bug and it's supposed to be fixed in VS2015 Update 1. In fact this update might also show the exception list in the VB.NET quick info but I didn't check.



回答2:

since VS2015 has taken this feature away I doubt very much that VB.NET will be able to support this in VS2013 via any work-arounds or third party method.

See also reference to feature gone in C# for VS2015 which does not help with VB.NET but I suspect when they added additional features to VS2015 that the feature for showing exceptions was not possible anymore.