Skip to content

Commit

Permalink
Merge pull request #54232 from dotnet/merges/main-to-main-vs-deps
Browse files Browse the repository at this point in the history
Merge main to main-vs-deps
  • Loading branch information
msftbot[bot] authored Jun 19, 2021
2 parents 934166c + 3a51c80 commit ead5ec8
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.EditAndContinue;
using Microsoft.CodeAnalysis.ErrorReporting;
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.CodeAnalysis.Text;
using Microsoft.VisualStudio.Debugger.Contracts.EditAndContinue;
Expand Down Expand Up @@ -78,6 +79,9 @@ private RemoteDebuggingSessionProxy GetDebuggingSession()
return debuggingSession;
}

private Solution GetCurrentCompileTimeSolution()
=> _proxy.Workspace.Services.GetRequiredService<ICompileTimeSolutionProvider>().GetCompileTimeSolution(_proxy.Workspace.CurrentSolution);

public async ValueTask StartSessionAsync(CancellationToken cancellationToken)
{
if (_disabled)
Expand All @@ -87,7 +91,7 @@ public async ValueTask StartSessionAsync(CancellationToken cancellationToken)

try
{
var solution = _proxy.Workspace.CurrentSolution;
var solution = GetCurrentCompileTimeSolution();
_debuggingSession = await _proxy.StartDebuggingSessionAsync(solution, _debuggerService, captureMatchingDocuments: false, reportDiagnostics: true, cancellationToken).ConfigureAwait(false);
}
catch (Exception e) when (FatalError.ReportAndCatchUnlessCanceled(e, cancellationToken))
Expand All @@ -107,7 +111,7 @@ public async ValueTask<ManagedHotReloadUpdates> GetUpdatesAsync(CancellationToke

try
{
var solution = _proxy.Workspace.CurrentSolution;
var solution = GetCurrentCompileTimeSolution();
var (moduleUpdates, diagnosticData, rudeEdits) = await GetDebuggingSession().EmitSolutionUpdateAsync(solution, s_solutionActiveStatementSpanProvider, _diagnosticService, _diagnosticUpdateSource, cancellationToken).ConfigureAwait(false);

var updates = moduleUpdates.Updates.SelectAsArray(
Expand Down

0 comments on commit ead5ec8

Please sign in to comment.