Exception thrown in debug mode, but where?

你离开我真会死。 提交于 2019-12-24 03:31:03

问题


A first chance exception of type 'System.IO.IsolatedStorage.IsolatedStorageException' occurred in mscorlib.ni.dll Operation not permitted on IsolatedStorageFileStream.

It shows me this notice, but I don't know where does it generate it. How find out where is the code which generates this exception?

PS.

I'm using debug mode. (C#)


回答1:


This is a first-chance exception, i.e. one that has a try-catch block that will take care of it. By default, Visual Studio doesn't break on first-chance exceptions.

To make Visual Studio break when that exception is thrown do the following:

  • Open the "Debug" menu and click "Exceptions..."
  • Select the checkbox in the "Thrown" column for the exception you want.

  • Click OK

Henceforth, the Visual Studio debugger will always break on that particular exception, whenever it's thrown. To go back to the original behavior, clear the checkbox in the "Thrown" column.



来源:https://stackoverflow.com/questions/15763279/exception-thrown-in-debug-mode-but-where

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