fordeka
fordeka

Reputation: 979

Debugging in VS2012 with NUnit without throwing exceptions?

I have NUnit running into VS2012 with the NUnit Test Adapter and I can do Run All tests fine, but if I want to Debug All Tests every time I hit an Assert it throws an exception. How do I make it not throw exceptions for Asserts? Am I doing something horribly wrong?

Upvotes: 4

Views: 259

Answers (1)

J. Steen
J. Steen

Reputation: 15578

When the debugger is attached, failed asserts throw exceptions. This is intended behaviour. No need to be alarmed.

You can stop Visual Studio from stopping at certain exceptions, by going into Debug -> Exceptions... and unchecking all or some items in the appropriate group, from the column "Thrown" in the "Break when an exception is:" box.

The Exceptions dialog box

Upvotes: 5

Related Questions