I’m developing a simple program which utilize EnvDTE to automatically attach to a process. I already got an EnvDTE object successfully but I cannot enumerate the Debugger5.Transports
field. Code below worked yesterday but raises an exception now and after restarting Windows it still does not work.
var debugger = dte.Debugger as Debugger5;
var enumerator = debugger.Transports.Cast<Transport>().GetEnumerator();
var t = enumerator.MoveNext(); // <- Unhandled exception occurred
// COMException: (0x8002802B): Element not found. (0x8002802B (TYPE_E_ELEMENTNOTFOUND))
Is there any possible solution?
Thanks in advance.