Exception thrown in debug mode, but where?

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#)

Upvotes: 2

Views: 161

Answers (1)

Stefan Dragnev
Stefan Dragnev

Reputation: 14473

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.

Upvotes: 6

Related Questions