VS Break When Exception Occurs
-
In VS2010, can I somehow 'pause' execute when an exception occurs. My Error Handler is turned off so that in dev mode I can see what's going wrong. When I hit a line that causes an exception, all I get is Continue and Quit. Continue doesn't see to do anything. Clicking it has no visual effect, meaning no code is higlighted and I don't know where in the code the error occured.
-
In VS2010, can I somehow 'pause' execute when an exception occurs. My Error Handler is turned off so that in dev mode I can see what's going wrong. When I hit a line that causes an exception, all I get is Continue and Quit. Continue doesn't see to do anything. Clicking it has no visual effect, meaning no code is higlighted and I don't know where in the code the error occured.
If you are running the program from Visual Studio, then Yes you can. In VS2010 click on the top menu item "Debug" and in that drop down click on "Exceptiosn". Here you will see a list of options to "Break when an exception is:" list, you want to check mark the "Thrown" box next to "Common Language Runtime Exceptions". This makes it to where when that error occurs in the code it will throw the exception through VS instead of through the Windows JIT exception handler. Excellent tool to see where the errors happen as they happen even when you handle them within the application. You can turn that off at anytime as well. *Note, if your running outside of the IDE you can attach to it if the code version in the applicaiton is the same as the application and that is a different subject... Hope that helps.
-
In VS2010, can I somehow 'pause' execute when an exception occurs. My Error Handler is turned off so that in dev mode I can see what's going wrong. When I hit a line that causes an exception, all I get is Continue and Quit. Continue doesn't see to do anything. Clicking it has no visual effect, meaning no code is higlighted and I don't know where in the code the error occured.
Make sure you're running in debug mode... if you click on "Continue" and it doesn't do anything, that's usually an indication that you're in release mode and your executable hasn't been build with debug information.