예제 #1
0
파일: Extensions.cs 프로젝트: xoriath/PTVS
        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);
                }
            }
        }
예제 #2
0
        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);
                }
            }
        }