简体   繁体   中英

Visual Studio 2010 Exceptions checking extension

I'm looking for some way to make a VS editor highlight methods that throws an exception. I've looked around for some add-in, but I haven't found any suitable.

So I've been looking for some tutorials describing how to make my own add-in. I found many tutorials showing how to underline text, modify tooltip and so on, but I haven't found any tutorial that shows how to access a documentation of specific method.

I'll be glad for any help.

You can use information provided by IntelliSense:

在此输入图像描述

You can provide exception list to IntelliSence via xml comments to your methods:

/// <summary>
/// Foos every bar.
/// </summary>
/// <exception cref="System.ArgumentOutOfRangeException"/>
public static void Foo()
{
    throw new ArgumentOutOfRangeException();
}

您可以使用VS调试器来跟踪代码或使用断点来运行一个会突出显示行的宏(不确定这是否正确,因为您必须在某些关键点应用它们)

You also can set Exception settings of VS (Ctrl-Shift-E) to stop immediately on exception thrown. That will cease execution on method that caused exception and put cursor on it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM