views:

67

answers:

1

I'm working on a VS2010 project where I'm using DataAnnotations on my objects to handle validation. However, this is sort of a pain in the butt while trying to do interactive debugging because it keeps pausing VS.Net on validation errors.

Obviously, I want to break on some errors, but not these particular types. Am I out of luck and I just need to turn on and off my Break on All Errors setting? Or is there some way to tell VS to just ignore these when they happen? (these are errors generated via Validator.ValidateProperty calls.)

Thanks

+4  A: 

You click on Debug->Exceptions and then uncheck the ones you do not want.

Oskar Kjellin
Yeah, I'm a moron, I just found that. Thanks. More instructions:Ctrl-Alt-E to open the Debug->ExceptionsClick to open Common Language Runtime ExceptionsScroll down to System.ComponentModel.DataAnnotations and uncheck the User-unhandled.Can't believe I didn't know about this before. Dang.
Vulgrin
@Vulgrin Nice to hear that you found it :) If you think this is answered, please mark it as answered by checking the mark.
Oskar Kjellin