Monday, April 10, 2006

Debugging Mixed Interop Native and Managed Assemblies with Visual Studio 2005

I've been trying to track down a bug in a managed C++ wrapper around native C++ classes, and Visual Studio 2005 won't allow me to step directly from the managed code into the native code. I know it is possible, but this is the only way I see to do it:



  1. Put a System.Diagnostics.Debug.Assert(false) near the start of the application.

  2. Run the application and accept the option to debug it.

  3. Opt to "manually choose debugger," and choose both native and managed.

  4. Visual Studio 2005 then allows me to step into the native code.


Drew

No comments: