How to break only on UNHANDLED errors?
I can't figure out how to get VS to break only on unhandled errors. I've tried this checking the "User-unhandled" box and unchecking the "Thrown" box for "Common Language Run-time Exceptions" and I've tried checking both boxes, and I've tried checking only the "Thrown" box, and I've tried unchecking both boxes.
VS either completely ignores all run-time exceptions or breaks on both handled and unhandled run-time exceptions. Is my VS 2008 IDE broken or am I missing something?
Re: How to break only on UNHANDLED errors?
Sounds like something is broken because breaking on unhandled exceptions only is the default. Have you tried the "Reset All" button?
Re: How to break only on UNHANDLED errors?
so you are saying if you put this in the form load:
vb Code:
try
throw new exception("error")
catch ex as exception
end try
it breaks on the throw line in vs when you run it?/
kris
Re: How to break only on UNHANDLED errors?
Quote:
Originally Posted by
i00
so you are saying if you put this in the form load:
vb Code:
try
throw new exception("error")
catch ex as exception
end try
it breaks on the throw line in vs when you run it?/
kris
Yes, that's exactly what I'm saying. What happens is the form just loads and there is no indication that anything is wrong. You can even select widgets and do things.
I did the Reset All, and now all exceptions are completely ignored. This is the case for both computers on which I have VS 2008 installed. I have no way to debug anything.
I don't see subscript out of range errors, I don't see anything. The only way I can catch such errors is to break on ALL errors, and I only want to break on UNHANDLED errors.
This is maddening. I can deal with all the strict protect-you-from-yourself syntax management, but I can't deal with not being able to debug one damned thing.
Re: How to break only on UNHANDLED errors?
ahh ic what you mean ... this is only on the form initialization... and this p*ss*s me off too...
happens in vista +
and heres the cr*p thing:
CODE THAT ERRORS WILL NOT BREAK IF IT IS RUN WHEN A FORM INITIALIZES :(
it really s*x .... and it must be an os thing ... in windows xp it breaks
have a look at this thread that i started ages ago:
http://www.vbforums.com/showthread.php?t=582462
Kris
Re: How to break only on UNHANDLED errors?
also i assume that it's because the form comes from the OS and in vista the logic behind the form is something like this when it loads:
vb Code:
Try
RaiseEvent Load(.....
catch ex as exception
'do nothing :(
end try
Kris