私の場合、レジストリの変更は必要ありませんでした。このトピックとReddの回答によると、Program.csファイルを次のように変更しました。
static void Main()
{
try
{
System.Windows.Forms.Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
System.Windows.Forms.Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(OnGuiUnhandedException);
AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
var form = new MainForm();
form.ShowDialog();
}
catch (Exception e)
{
HandleUnhandledException(e);
}
finally
{
// Do stuff
}
}
private static void HandleUnhandledException(Object o)
{
// TODO: Log it!
Exception e = o as Exception;
if (e != null)
{
}
}
private static void OnUnhandledException(Object sender, UnhandledExceptionEventArgs e)
{
HandleUnhandledException(e.ExceptionObject);
}
private static void OnGuiUnhandedException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
HandleUnhandledException(e.Exception);
}
これで、デバッガーは正常に動作するため、未処理の例外で停止し、処理済みの例外で停止しません。MicrosoftはOSレベルでWindows764ビット用のSP1のサイレント例外の問題を解決しているようですが、VSを正しく機能させるには、ユーザー/プログラマーのアクションが必要です。