Is it possible to get a list or a specific instance of IDebugEngine2 (MSDN) from a Visual Studio Package without using IVsLoader approach (describe
What are you trying to do with it? The debugger interfaces are extremely fragile. Often there are 2, 3, or maybe more possible ways to perform an action with the debugger interfaces, but the particular DE implementation only supports 1 of them. Debug engine implementers are not expecting any direct calls to their debug engine interfaces from anywhere except Visual Studio itself, and the risk of breaking debugger functionality if you attempt it lies somewhere between very high and guaranteed.
For example, here are some of the potential ways to tell a DE to launch and/or attach to a process:
IDebugEngineLaunch2.LaunchSuspendedIDebugPortEx2.LaunchSuspendedIDebugProgramEx2.AttachIDebugProgramNode2.Attach_V7IDebugProgramNodeAttach2.OnAttachIDebugEngine2.AttachIVsDebuggableProjectCfg.DebugLaunchVsShellUtilities.LaunchDebuggerIVsDebugger2.LaunchDebugTargetsIVsDebugger2.LaunchDebugTargets2Edit 1: In the case of my Java debugger, the debug engine is created by the session manager with the following stack:
IVsDebugger2.LaunchDebugTargets2IDebugProgramProvider2.WatchForProviderEventsIDebugProgram2 (a copy of IDebugProcess2 obtained from the IDebugDefaultPort2 that VS passed to WatchForProviderEvents is passed to the IDebugProgram2 constructor), my code calls IDebugPortNotify2.AddProgramNodeI recently was investigating the same question, and eventually found you can easily do this via ILocalRegistry3.CreateInstance!
Please see my post here for more info