In a Visual Studio 2013 automation project (ie Visual Studio Package project), how can I have an event handler run when the debugged process exits, and how can I find out what the exit code of the debugged process was?
I'm starting the debugger like this (C#):
var dte = ...;
foreach (EnvDTE.Project proj in dte.Solution.Projects)
{
if (proj.Name == "blahblah")
{
dte.Solution.Properties.Item("StartupProject").Value = proj.Name;
dte.Debugger.Go(false);
break;
}
}
I want some more code to run when the debugged process exits, and that code needs to know the exit status of the debugged process. Can it be done?