public async ValueTask <RemoteDebuggingSessionProxy?> StartDebuggingSessionAsync( Solution solution, IManagedHotReloadService debuggerService, ImmutableArray <DocumentId> captureMatchingDocuments, bool captureAllMatchingDocuments, bool reportDiagnostics, CancellationToken cancellationToken) { var client = await RemoteHostClient.TryGetClientAsync(Workspace, cancellationToken).ConfigureAwait(false); if (client == null) { var sessionId = await GetLocalService().StartDebuggingSessionAsync(solution, debuggerService, captureMatchingDocuments, captureAllMatchingDocuments, reportDiagnostics, cancellationToken).ConfigureAwait(false); return(new RemoteDebuggingSessionProxy(Workspace, LocalConnection.Instance, sessionId)); } // need to keep the providers alive until the edit session ends: var connection = client.CreateConnection <IRemoteEditAndContinueService>( callbackTarget: new EditSessionCallback(debuggerService)); var sessionIdOpt = await connection.TryInvokeAsync( solution, async (service, solutionInfo, callbackId, cancellationToken) => await service.StartDebuggingSessionAsync(solutionInfo, callbackId, captureMatchingDocuments, captureAllMatchingDocuments, reportDiagnostics, cancellationToken).ConfigureAwait(false), cancellationToken).ConfigureAwait(false); if (sessionIdOpt.HasValue) { return(new RemoteDebuggingSessionProxy(Workspace, connection, sessionIdOpt.Value)); } connection.Dispose(); return(null); }
public ManagedHotReloadLanguageService( VisualStudioWorkspace workspace, IManagedHotReloadService hotReloadService, IDiagnosticAnalyzerService diagnosticService, EditAndContinueDiagnosticUpdateSource diagnosticUpdateSource) { _proxy = new RemoteEditAndContinueServiceProxy(workspace); _debuggerService = new DebuggerService(hotReloadService); _diagnosticService = diagnosticService; _diagnosticUpdateSource = diagnosticUpdateSource; }
public GlassTestsHotReloadService(HostWorkspaceServices services, IManagedHotReloadService debuggerService) { _encService = services.GetRequiredService <IEditAndContinueWorkspaceService>(); _debuggerService = debuggerService; }
public DebuggerService(IManagedHotReloadService hotReloadService) { _hotReloadService = hotReloadService; }
public ManagedHotReloadServiceImpl(IManagedHotReloadService service) => _service = service;
public EditSessionCallback(IManagedHotReloadService debuggerService) { _debuggerService = debuggerService; }