#pragma warning restore /// <summary> /// Called by the debugger when a debugging session starts and managed debugging is being used. /// </summary> public async Task StartDebuggingAsync(Dbg.DebugSessionOptions options, CancellationToken cancellationToken) { _debuggingService.OnBeforeDebuggingStateChanged(DebuggingState.Design, DebuggingState.Run); _disabled = (options & Dbg.DebugSessionOptions.EditAndContinueDisabled) != 0; if (_disabled) { return; } try { var solution = _proxy.Workspace.CurrentSolution; await _proxy.StartDebuggingSessionAsync(solution, cancellationToken).ConfigureAwait(false); } catch (Exception e) when(FatalError.ReportAndCatchUnlessCanceled(e)) { _disabled = true; } }
#pragma warning disable VSTHRD102 // TODO: Implement internal logic asynchronously public void StartDebugging(Dbg.DebugSessionOptions options) => Shell.ThreadHelper.JoinableTaskFactory.Run(() => StartDebuggingAsync(options, CancellationToken.None));