A First change exception of type ... but WHERE ???

I'm getting several time a 'A first change exception of type ... (in SqlException or in TargetInvoctionException). The first ones don't stop the excecution, the last one does.

My problem is that i can't see where in the code this exception occurs, so it is hard to debug, the call stock is empty when the error stops the program.

What should i 'flag' in order to make it stop at the error ...

(C#, VS2005).



Answer this question

A First change exception of type ... but WHERE ???

  • ATinsley

    That will work in 2003 version, but I cannot find Exceptions under the Debug menu for 2005. Any ideas how I can set this in vs 2005
  • Freelancer

    It is right. In certain cases, you also want to disable "Just my code" (in the debug setting of the tool/option dialog).

    Thanks

    Lifeng



  • lakshmiy

    Go the the Debug menu and select Exceptions. This will bring up the window where you can control when the debugger breaks execution. You can use this to tell the debugger to break as soon as the exception is thrown.
  • neilfire

    It should be under the Debug menu in VS2005 as well.

    If the menu entry is not there, open the project, display the Command Window and then in the Command Window, type

    Debug.Exceptions

    which should open the Exceptions dialog. If that works, I'd suggest using the Customize... feature to put the exceptions entry back on to the Debug menu.


  • A First change exception of type ... but WHERE ???