Reputation: 6493
In this piece of code (runs in a unit test under debugging)
try
{
var process = Process.GetProcessById(ProcessID);
_isRunningCache = WindowHandle != IntPtr.Zero
&& User32.IsWindow(WindowHandle) && !process.HasExited
&& process.Responding;
}
catch
{
return Invalidate();
}
I receive a report for an exception occurred (I do have reporting of unhandled exceptions enabled), but nevertheless visual studio interrupts the process and reports the exeption in the following manner:
What can I do to prevent this? (despite disabling reporting of unhandled exceptions)
Upvotes: 2
Views: 365
Reputation: 13091
Go to Debug -> Exceptions and deselect any checkboxes in the 'Thrown' column.
Ensure the 'User-unhandled' is checked for Common Language Runtime Exceptions.
Upvotes: 3