You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The HostLogger type isn't directly referenced from this assembly, however it uses a common IObservable interface and this alias helps make it more clear the purpose. We can use Microsoft.Extensions.Logging from this point because the ALC should be loaded, but we need to only expose the IObservable to the Hosting assembly so it doesn't try to load MEL before the ALC is ready.
@@ -26,16 +28,17 @@ internal class PsesDebugServer : IDisposable
26
28
privatePsesInternalHost_psesHost;
27
29
privatebool_startedPses;
28
30
privatereadonlybool_isTemp;
29
-
protectedreadonlyILoggerFactory_loggerFactory;
31
+
// FIXME: This was never actually used in the debug server. Since we never have a debug server without an LSP, we could probably remove this and either reuse the MEL from the LSP, or create a new one here. It is probably best to only use this for exceptions that we can't reasonably send via the DAP protocol, which should only be anything before the initialize request.
32
+
protectedreadonlyHostLogger_hostLogger;
30
33
31
34
publicPsesDebugServer(
32
-
ILoggerFactoryfactory,
35
+
HostLoggerhostLogger,
33
36
StreaminputStream,
34
37
StreamoutputStream,
35
38
IServiceProviderserviceProvider,
36
39
boolisTemp=false)
37
40
{
38
-
_loggerFactory=factory;
41
+
_hostLogger=hostLogger;
39
42
_inputStream=inputStream;
40
43
_outputStream=outputStream;
41
44
ServiceProvider=serviceProvider;
@@ -130,7 +133,6 @@ public void Dispose()
130
133
_debugAdapterServer?.Dispose();
131
134
_inputStream.Dispose();
132
135
_outputStream.Dispose();
133
-
_loggerFactory.Dispose();
134
136
_serverStopped.SetResult(true);
135
137
// TODO: If the debugger has stopped, should we clear the breakpoints?
0 commit comments