2

类型为“System.IO.IsolatedStorage.IsolatedStorageException”的第一次机会异常发生在 mscorlib.ni.dll 中,IsolatedStorageFileStream 上不允许操作。

它向我显示了此通知,但我不知道它在哪里生成。如何找出生成此异常的代码在哪里?

PS。

我正在使用调试模式。(C#)

4

1 回答 1

6

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. exceptions dialog
  • 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.

于 2013-04-02T12:16:53.177 回答