Exceptions Not Being Thrown In Visual Studio

谁说我不能喝 提交于 2019-12-22 04:21:24

问题


For some reason my exceptions arent being thrown anymore in Visual Studio. I get the error in JSON on the response, but Visual Studio in debug mode no longer throws an error and stops Visual Studio at that error when it happens.

I have looked into posts like this:

Visual Studio not stopping on an exception being thrown

But I just want to reset where I was before, not enable exceptions one by one.


回答1:


To reset the exceptions settings, go to Debug>Exceptions and click "Reset All."

You can also drill down and control what happens for different types of exceptions.

update

You mentioned that you are missing the User-Unhandled column. In that case, you may need to set this:




回答2:


Cntrl + Alt + E (Or Debug -> Exceptions)
Then select "Reset All", that will return the default exceptions on.




回答3:


I hit a problem where it wasn't stopping on an exception and resetting the exception settings worked for me. To expand on Jay's answer above, in VS 2019 that option to reset is in a slightly different place (arguably a step backward compared to how it was before, it's clearer there).

Go to debug -> windows -> exception settings

The reset button is now this icon here:



来源:https://stackoverflow.com/questions/17311171/exceptions-not-being-thrown-in-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!