Debugging Exceptions.
-
Is there a way in VStudio to set a breakpoint on a line where an exception is expected and tell the debugger that when a particular exception is encountered to "catch" it and proceed with the normal flow of execution? This is particularly useful so that putting a try-catch and then rebuilding would not be necessary while discovering exceptions. Hope not a newbie/ridiculous question.
---------------------------------------------------------- Lorem ipsum dolor sit amet.
-
Is there a way in VStudio to set a breakpoint on a line where an exception is expected and tell the debugger that when a particular exception is encountered to "catch" it and proceed with the normal flow of execution? This is particularly useful so that putting a try-catch and then rebuilding would not be necessary while discovering exceptions. Hope not a newbie/ridiculous question.
---------------------------------------------------------- Lorem ipsum dolor sit amet.
Hi, Are facing any problem in putting try/catch in your code block? I guess, it is not so difficult. It is anyways suggested to use try/catch unless you are so much sure about your code that it will never throw exception. (No further argument on this, as different people has different school of thoughts) :) If you are developing web application,
void Application_Error(object sender, EventArgs e)
method in Global.asax file catches your exception (just after exception is thrown) and you can put breakpoint there to analyze what happened wrong. Hope this will help.Anurag Gandhi.
http://www.gandhisoft.com
Life is a computer program and every one is the programmer of his own life.
My latest article: Group GridView Data