问题
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