Visual Studio 2010 test not included in debugger on exception

I am trying to debug a C # application with Visual Studio 2010 using Microsoft.VisualStudio.TestTools.UnitTesting.

When I run the test in debug mode and the test throws an exception, it does not insert me into the debugger, it just exits and tells me that an unhandled exception was sent.

Is there a way to get it to open the debugger the same way it does when an unhandled exception occurs while debugging the application?

+1
source share
2 answers

Visual Studio allows you to determine which exceptions should be caught by the debugger. Go to Debug-> Exceptions or ctlr-alt-e.

You can then verify that the exception you want to catch is included.

+3
source

Make sure you run "Test-> Debug" or "Debug test" / "Debug selected test". Simply running tests with configuration for Debug will not attach the debugger to the current test.

+1
source

All Articles