Thursday, April 06, 2006

Breaking on Exceptions.


By default, the vs debugger will break if an exception is unhandled, but we can configure it to break when the exceptions are thrown. It is very helpful in some situations if we want to know exactly where the exception throws.

Under Debug Menu, select exceptions, you’ll see a tree display of all possible exceptions alongside checkboxes to indicate if the debugger should break when an exception “is thrown”, or only break if the exception is “user-unhandled”.

If you have not determined under what condition the exception occurs, or where the exception occurs, it's better to choose break on exceptions.

No comments: