internal static async System.Threading.Tasks.Task RefreshVariableViews(this IServiceProvider serviceProvider) { EnvDTE.Debugger debugger = serviceProvider.GetDTE().Debugger; AD7Engine engine = AD7Engine.GetEngineForProcess(debugger.CurrentProcess); if (engine != null) { await engine.RefreshThreadFrames(debugger.CurrentThread.ID); var vsDebugger = (IDebugRefreshNotification140)serviceProvider.GetShellDebugger(); if (vsDebugger != null) { // Passing fCallstackFormattingAffected = TRUE to OnExpressionEvaluationRefreshRequested to force refresh vsDebugger.OnExpressionEvaluationRefreshRequested(1); } } }
internal static async Task RefreshVariableViewsAsync(this IServiceProvider serviceProvider, CancellationToken ct = default(CancellationToken)) { serviceProvider.GetUIThread().MustBeCalledFromUIThread(); EnvDTE.Debugger debugger = serviceProvider.GetDTE()?.Debugger; if (debugger == null) { return; } AD7Engine engine = AD7Engine.GetEngineForProcess(debugger.CurrentProcess); if (engine != null) { await engine.RefreshThreadFrames(debugger.CurrentThread.ID, ct); var vsDebugger = serviceProvider.GetShellDebugger() as IDebugRefreshNotification140; if (vsDebugger != null) { // Passing fCallstackFormattingAffected = TRUE to OnExpressionEvaluationRefreshRequested to force refresh vsDebugger.OnExpressionEvaluationRefreshRequested(1); } } }