//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public async Task <int> PrepareLaunch() { LoggingUtils.PrintFunction(); DateTime logTime = DateTime.Now; await m_debugConnectionService.LaunchDialogShow(); return(await m_debugConnectionService.LaunchDialogUpdate(string.Format(CultureInfo.InvariantCulture, "Session started: {0}", logTime.ToString("F", CultureInfo.CurrentCulture)), false)); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public int OnDebuggerConnectionEvent(IDebugEngine2 pEngine, IDebugProcess2 pProcess, IDebugProgram2 pProgram, IDebugThread2 pThread, IDebugEvent2 pEvent, ref Guid riidEvent, uint dwAttrib) { LoggingUtils.PrintFunction(); try { DebugEngineEvent.DebuggerConnectionEvent debuggerConnectionEvent = pEvent as DebugEngineEvent.DebuggerConnectionEvent; switch (debuggerConnectionEvent.Type) { case DebugEngineEvent.DebuggerConnectionEvent.EventType.ShowDialog: { LoggingUtils.RequireOk(m_debuggerConnectionService.LaunchDialogShow()); break; } case DebugEngineEvent.DebuggerConnectionEvent.EventType.CloseDialog: { LoggingUtils.RequireOk(m_debuggerConnectionService.LaunchDialogClose()); break; } case DebugEngineEvent.DebuggerConnectionEvent.EventType.LogStatus: case DebugEngineEvent.DebuggerConnectionEvent.EventType.LogError: { bool isError = (debuggerConnectionEvent.Type == DebugEngineEvent.DebuggerConnectionEvent.EventType.LogError); LoggingUtils.RequireOk(m_debuggerConnectionService.LaunchDialogUpdate(debuggerConnectionEvent.Message, isError)); break; } } return(VSConstants.S_OK); } catch (Exception e) { LoggingUtils.HandleException(e); return(VSConstants.E_FAIL); } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public void PrepareLaunch() { LoggingUtils.PrintFunction(); try { DateTime logTime = DateTime.Now; LoggingUtils.RequireOk(m_debugConnectionService.LaunchDialogShow()); LoggingUtils.RequireOk(m_debugConnectionService.LaunchDialogUpdate(string.Format(CultureInfo.InvariantCulture, "Session started: {0}", logTime.ToString("F", CultureInfo.CurrentCulture)), false)); } catch (Exception e) { LoggingUtils.HandleException(e); throw; } }