Friday, February 27, 2009

Debugger won't break in managed dll when running from unmanaged project

In the previously described scenario, where a native MFC C++ application calls a .NET assembly via a bridge dll, I ran into some debugging issues.

  1. The debugger doesn't stop at break points set in the bridge dll or the .NET assembly code.
  2. The debugger doesn't step into the bridge dll source code.

This problem is solved by setting Configuration Properties | Debugger Type to Mixed mode for each project.

Note: this is a different than setting "Mixed Platforms", which appears when you have a C++ project and a C# project in the same solution.

No comments: