A mixed-mode application is any application that combines native code (C++) with managed code (such as Visual Basic, Visual C#, or C++ that runs on the common language runtime) . Debugging mixed-mode applications is largely transparent in Visual Studio; it is not too different from debugging a single-mode application .
Why do you debug in mixed mode?
Debugging in both managed and native code is also known as mixed-mode debugging. There are two scenarios for doing so, depending on whether the DLL or the application is written in native code:
- The calling application that calls your DLL is written in native code. In this case your DLL is managed, and both managed and native debuggers must be enabled to debug both. You can check this in the <Project> Property Pages dialog box. How you do this depends on whether you start debugging from the DLL project or the calling application project.
- The calling application that calls your DLL is written in managed code and your DLL is written in native code.
How to enable mixed-mode debugging?
- In Solution Explorer, select the project.
- On the View menu, click Property Pages.
- In the <Project> Property Pages dialog box, expand the Configuration Properties node, and then select Debugging.
- Set Debugger Type to Mixed.