Debugging question

H

Harry F. Harrison

In the IDE, is it possible to have the debugger ignore 'first chance
exceptions' for a specific method?

I have my IDE set to 'break into the debugger' for CLR exceptions.

However, I have a few situations, where exceptions are thrown, but are
handled, and I don't want the debugger to stop and wait for me to continue
for those methods- it gets old.

2 examples:

I have a situation where I call the ODBC Provider DataAdapter Fill method to
return schema information, and I get a first chance exception because the
provider can't return multiple results, but I get my data, and don't really
care about the exception. However, the debugger stops on the error, then if
I hit 'Continue', it goes without throwing me the error later.

Another place is date validation. I use the Microsoft.VisualBasic.IsDate()
function, and it returns an exception - argh - it should just return True or
False - it's a boolean function.

I sure miss VB6 - 'Break on unhandled errors' feature.
 
J

Josh Moody [MSFT]

In the debug menu -> Exceptions, at the bottom of the window that appears,
choose "Continue" for "When the exception is thrown" and "Break into the
debugger" for "If the exception is not handled".

That should do exactly what you are looking for.

Josh Moody
Developer Division Sustained Engineering Team

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top