次の方法で共有


Debugging Mixed-Mode Applications

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

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. There are a few special considerations, however.

Enable C++ Edit and Continue in Mixed Mode Debugging

To enable Edit and Continue for C++, see How to enable and disable Edit and Continue.

Note

To use Edit and Continue for C++ in Visual Studio 2013, you have to revert to the legacy debugging engine. See Switching to Managed Compatibility Mode in Visual Studio 2013 on the Microsoft Application Lifecycle Management blog.

Property Evaluation in Mixed-Mode Applications

In a mixed-mode application, the evaluation of properties by the debugger is an expensive operation. As a result, debugging operations such as stepping might appear slow. For more information, see Navigating code in the debugger. If you experience poor performance in mixed-mode debugging, you might want to turn off property evaluation in the debugger windows.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Reset settings.

To turn off property evaluation

  1. On the Tools menu, choose Options.

  2. In the Options dialog box, open the Debugging folder and select the General category.

  3. Clear the Enable property evaluation and other implicit function calls check box.

    Because native call stacks and managed call stacks differ, the debugger cannot always provide the complete call stack for mixed code. When native code calls managed code, you may notice some discrepancies. For more information, see Mixed Code and Missing Information in the Call Stack Window.

See also