First Chance Exceptions

Having converted a VB.Net 2003 project to VB2005 as soon as the program is run in the debugger I get these two statements in the Imediate window

A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll

A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in System.Windows.Forms.dll

Can any one shed any light as to what the cause is I have a break point at the very first execution statement so it seems to be created prior to the user generated program code.

Thanks



Answer this question

First Chance Exceptions

  • Raghunc

    First chance exception could happen in the framework code, and if it is caught inside framework, it might affect nothing in your program. You can make the debugger to stop when the exception is thrown, so you can get the exactly call stack.

    To do that, you should turn off "Just my code" (in the debug tab in the tool option window.) after that, you should make debugger to stop on first chance exceptions (use the dialog through debug/exception... menu, turn on Common Language Runtime exceptions).

    Without callstack, it is difficult to know what is going wrong.



  • raghuramaiah

    could you please share your call stack to this exception

  • Bogdan.B

    I have the same problem. I just wonder if you ever got an answer to this question.

    Thanks

    Kerry


  • First Chance Exceptions