VSIX - Use "Managed Compatibility Mode" debug engine
Asked Answered
A

0

10

Does somebody know how we can use the "Managed Compatibility Mode" debugger, to attach to a process from inside a VSIX package code with VS2015? We currently use the following code, to find the "Managed 4.0" engine, but it seems that the "Managed Compatibility Mode" engine cannot be found.

foreach (EnvDTE80.Transport tr in Debugger.Transports)
    foreach (EnvDTE80.Engine eng in tr.Engines)
    {
        if (VisualStudioDebugEngines.Managed40.Equals(new Guid(eng.ID)))
        {
            transport = tr;
            engine = eng;
        }
    }

process.Attach2(engine);

In other words: how to do this in code:

Managed Compatibility Mode

Auricula answered 29/11, 2015 at 11:22 Comment(3)
That option enables the "old" debugging engine. Use Regedit.exe to review the HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0_Config\AD7Metrics\Engine registry key. There are several candidate Guids listed there, I don't know which is the right one, only which one is the wrong one.Initiation
Via the following site, I found out that the GUID is "{351668CC-8477-4fbf-BFE3-5F1006E4DB1F}" : blogs.msdn.com/b/visualstudioalm/archive/2013/10/16/…. How do I find the correct engine to pass to the Attach2() method?Auricula
Can you give a little background on your scenario? Is this for a regular managed project or a custom project type? Have you tried COMPlusLegacyEngine_guid?Katusha

© 2022 - 2024 — McMap. All rights reserved.