I'm getting first chance exceptions in my output window in debug mode. How do I find where they're coming from? Do I have to put a breakpoint in every catch?
A first chance exception of type 'System.IO.IOException' occurred in mscorlib.dll
Click Start and select Control Panel. Click Windows Firewall. Click the Exceptions tab.
With a solution open in Visual Studio, use Debug > Windows > Exception Settings to open the Exception Settings window. Provide handlers that respond to the most important exceptions. If you need to know how to add handlers for exceptions, see Fix bugs by writing better C# code.
first-chance exception (plural first-chance exceptions) (computing) An exception (error condition) when handled by a debugger, such that the programmer has the first chance to study it; such an exception would otherwise proceed to a handler or (in its absence) crash the program.
In Visual Studio, when exceptions are thrown or end up unhandled, the debugger can help you debug these by breaking just like it breaks when a breakpoint is hit.
Go to Debug, Exceptions (Ctrl + D, E), and check the types you're interested in.
This dialog tells the debugger to break whenever an exception is thrown, regardless of whether it's caught.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With