开发者

How do I get the exception to come up at the source of the exception and not the point I call Invoke?

开发者 https://www.devze.com 2022-12-10 10:33 出处:网络
I have written a command manager that uses 开发者_如何学JAVAreflection to make calls to various methods and it works wonderfully except that when an exception happens in one of the handlers the break

I have written a command manager that uses 开发者_如何学JAVAreflection to make calls to various methods and it works wonderfully except that when an exception happens in one of the handlers the break into debugging happens in the command manager and not at the point the exception was originally thrown. Is there a way to get it to break into the exception immediately rather than at the point I call Invoke?


Open the Exceptions settings window by choosing Debug->Exceptions.

In there, you can find the CLR exception that is being thrown. You can change the setting to break when the exception is Thrown instead of User-unhandled.

That will make it break at the appropriate time.


Do you mean while debugging? If yes, then go to Debug menu -> Exceptions, then you can configure the debugger to break when an exception is thrown instead of when it is caught.

You can either enable that feature for all exceptions, or if you know the type of the exception that you're interested in, then you can enable it for only that exception.

0

精彩评论

暂无评论...
验证码 换一张
取 消