   Weird debugging behavior (Visual Studio 2008, C#/C++)
  Right now I'm debugging a C# app that calls into a native C++ DLL using pInvoke.And there is a native function that is obviously failing somehow, but I'm having difficulty ascertaining the reason. I am stepping through the native function, and in stepping from one statement to the next, the execution of the program immediately jumps back up to the most recent C# method in the call stack.I've had weird behavior like this happen when exceptions were thrown in native code. Even though the exceptions are uncaught, the execution will return to the managed code and continue on as if nothing went wrong.However, I don't see any exceptions being thrown here. Certainly, I'm not stepping into any throw statements. I'm also checking the output window to see if it records any exceptions, but it doesn't.I'm making sure to use 'step into' instead of 'step over' wherever possible so that I don't miss anything. But it's weird. Basically, one matrix is being multiplied by the other using an overloaded *= operator. This operator is used hundreds, if not thousands, of times before the error occurs. At the time that the error occurs, both matrices are identity. I've stepped into the overloaded *= method to watch the multiplication take place. Everything seems fine. I then step out of the method, and I'm back inside the method that called it. I try to step to the next statement, and boom, I'm back in managed code 3 or 4 calls up the call stack. Just like that.Does anybody have any ideas?   
  Hello,From what you say it would sound to me like the debugger type in your project is set to "Managed only"..Would you check in your project properties, in the Debugging category, the "Debugger type" setting?Is it set to something like "Mixed" or "Auto"?Hope it could help, regards :)   ;  The project settings has "Enable unmanaged code debugging" clicked. I'm actually able to drill down pretty far into the unmanaged code, in fact I'm several unmanaged function calls deep when this problem occurs.   