public void EnterBreakState(IManagedActiveStatementProvider activeStatementProvider) { _debuggingService.OnBeforeDebuggingStateChanged(DebuggingState.Run, DebuggingState.Break); _encService?.StartEditSession(async cancellationToken => { var infos = await activeStatementProvider.GetActiveStatementsAsync(cancellationToken).ConfigureAwait(false); return(infos.SelectAsArray(ModuleUtilities.ToActiveStatementDebugInfo)); }); _activeStatementTrackingService.StartTracking(); }
public void StartEditSession(ActiveStatementProvider activeStatementsProvider) { var debuggingSession = _debuggingSession; Contract.ThrowIfNull(debuggingSession, "Edit session can only be started during debugging session"); var newSession = new EditSession(debuggingSession, _editSessionTelemetry, activeStatementsProvider); var previousSession = Interlocked.CompareExchange(ref _editSession, newSession, null); Contract.ThrowIfFalse(previousSession == null, "New edit session can't be started until the existing one has ended."); _trackingService.StartTracking(newSession); // clear diagnostics reported during run mode: ClearReportedRunModeDiagnostics(); }
public async Task EnterBreakStateAsync(CancellationToken cancellationToken) { _debuggingService.OnBeforeDebuggingStateChanged(DebuggingState.Run, DebuggingState.Break); if (_disabled) { return; } try { _editSessionConnection = await _proxy.StartEditSessionAsync(_diagnosticService, _debuggerService, cancellationToken).ConfigureAwait(false); } catch (Exception e) when(FatalError.ReportAndCatchUnlessCanceled(e)) { _disabled = true; } _activeStatementTrackingService.StartTracking(); }