'Cannot unwind or Continue and Edit if Assert throw
I am trying to do Edit/Continue in VS2015 Debugger.
This works 100% in VS2013.
But, once I hit an Assert. I keep getting cannot Unwind errors.
I have tried adding AssertFailedException to CLR Exceptions in Exception Settings. And I tried toggling Debugging settings: Enable Just My Code. And Unwind the call stack on unhandled exceptions.
[TestMethod]
public void TEST()
{
int a = 5;
int b = 1;
Assert.AreEqual(a, b);
throw new AssertFailedException("THIS IS OK");
int c= a + b;
}
UPDATE: Same fail when I tried several versions of the Microsoft.VisualStudio.QualitTools.UnitTestFramework library. 10.0.0 & 10.1.0 (file versions 12 and 14). I'm now trying the VS2015 Update2RC.
Solution 1:[1]
I tried it is working on VS2019.
In VS2019, Go to Debug > Windows > Exception Settings will show up "Break When Thrown" window.
Expand Common Language Runtime Exceptions
Check <All Common Language RunTime Exceptions not in this list>
Then you can unwind when Assert occured exceptions.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Yang Jk |
