9
9
using System . Threading ;
10
10
using System . Threading . Tasks ;
11
11
using Microsoft . Extensions . Logging ;
12
+ using Microsoft . Extensions . Logging . Debug ;
12
13
using OmniSharp . Extensions . DebugAdapter . Client ;
13
14
using OmniSharp . Extensions . DebugAdapter . Protocol . Models ;
14
15
using OmniSharp . Extensions . DebugAdapter . Protocol . Requests ;
@@ -33,8 +34,10 @@ public class DebugAdapterProtocolMessageTests : IAsyncLifetime, IDisposable
33
34
34
35
public async Task InitializeAsync ( )
35
36
{
36
- LoggerFactory factory = new ( ) ;
37
- _psesProcess = new PsesStdioProcess ( factory , true ) ;
37
+ LoggerFactory debugLoggerFactory = new ( ) ;
38
+ debugLoggerFactory . AddProvider ( new DebugLoggerProvider ( ) ) ;
39
+
40
+ _psesProcess = new PsesStdioProcess ( debugLoggerFactory , true ) ;
38
41
await _psesProcess . Start ( ) ;
39
42
40
43
TaskCompletionSource < bool > initialized = new ( ) ;
@@ -50,6 +53,11 @@ public async Task InitializeAsync()
50
53
options
51
54
. WithInput ( _psesProcess . OutputStream )
52
55
. WithOutput ( _psesProcess . InputStream )
56
+ . ConfigureLogging ( builder =>
57
+ builder
58
+ . AddDebug ( )
59
+ . SetMinimumLevel ( LogLevel . Trace )
60
+ )
53
61
// The OnStarted delegate gets run when we receive the _Initialized_ event from the server:
54
62
// https://microsoft.github.io/debug-adapter-protocol/specification#Events_Initialized
55
63
. OnStarted ( ( _ , _ ) =>
0 commit comments