c# - Debugger does not break the code when exceptions are thrown -


When I Winform program debugging, I recently discovered that the source code lines in Instead of breaking into a bad thing, the program is showing an error message, something will look like the following:

This is not good for me because I did not know where this code is due to this failure, do you know that my Visual Studio How does the debugger behave and how can I change it?

If you are running your code in non-debug mode the code displays no break, only MessageBox

error message, if you want to make an exception to throw and indicate your address, where the exception is raised to you Programs need to be run in debug mode . In

Edit: If you are already in debug mode, try this:

Step 1: VS IDE the debug menu> Step 2: exception select Step 3: now you common language runtime exception < There is a need to check the exception dialog in / code> option.

Enter image details here


Comments