I have a small issue.
Sometimes when I debug an application I want to simulate during the debug session an exception thrown from a method, but there is no way to do it.
I can’t even drag the cursor (the yellow one that indicate the current line) to an exception block.
The only way to trigger an exception during the run is to change the current line of code and to write the exception I want to throw. This method is not good because I might forget to change it back in the next run.
I have a small issue. Sometimes when I debug an application I want to
Share
Unfortunately, Visual Studio still doesn’t support throwing an exception from Immediate Window.
As well as doesn’t support lambda expressions, anonymous types, collection initializers, etc. Something like .NET 2.0 only.
Also you can use
Debug.Assert(false);