In Visual Studio click on Debug –> Exceptions, and when the dialog box appears click “Add”. Fill it in as below:
Be sure to check when “Thrown”. Now your code will break on the C# code where the error is thrown and you can find it more easily.
Technorati Tags:,,
