Is mixed-mode debugging for x64 supported for .Net 6?

RLWA32 49,551 Reputation points
2023-07-23T08:40:11.6533333+00:00

The docs at Mixed mode debugging for x64 processes is only supported when using Microsoft.NET Framework 4 or greater only refer to the .Net Framework. The docs are silent with respect to .Net (Core).

A solution contains a C++ console application (startup project), a C++/CLI class library (targeting .Net 6 and used to call into the C# class library), and a C# class library (targeting .Net 6). The VS2022 17.6.5 debugger cannot step through the code. If the debugger is set to Auto it will step into the C++ console application startup project but will not step into the C++/CLI class library. If the debugger is set to Mixed-Mode(.Net Core) attempting to step into the startup project using F10 just runs the application to completion.

The debugger options are set to Just My code.

Is mixed-mode debugging supported here?

Developer technologies | Visual Studio | Debugging
Developer technologies | C++
Developer technologies | .NET | Other
Developer technologies | Visual Studio | Other
Developer technologies | C#
{count} vote

1 answer

Sort by: Most helpful
  1. Minxin Yu 13,506 Reputation points Microsoft External Staff
    2023-07-24T09:01:57.15+00:00

    Hi,

    Thanks for your information. I reproduced your problem.

    I double checked and found that the .NET Framework library can't be debugged either. Debugger may not support in this way.

    User's image

    Update: Mixed-Mode(.Net Core)Add break points in C++/CLI library headers and C++ projects. It hits breakpoints in C++CLI, but skips C++ project's breakpoints.

    It would be better to report the issue to Developer Community.

    enter image description here

    Best regards,

    Minxin Yu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.