diff --git a/src/PowerShellEditorServices/Server/PsesDebugServer.cs b/src/PowerShellEditorServices/Server/PsesDebugServer.cs
index 6fbecce9c..9f48a0f2d 100644
--- a/src/PowerShellEditorServices/Server/PsesDebugServer.cs
+++ b/src/PowerShellEditorServices/Server/PsesDebugServer.cs
@@ -120,7 +120,8 @@ public async Task StartAsync()
response.SupportsDelayedStackTraceLoading = true;
return Task.CompletedTask;
- });
+ })
+ ;
}).ConfigureAwait(false);
}
diff --git a/test/PowerShellEditorServices.Test.E2E/DebugAdapterProtocolMessageTests.cs b/test/PowerShellEditorServices.Test.E2E/DebugAdapterProtocolMessageTests.cs
index bb794516f..7f9939a4d 100644
--- a/test/PowerShellEditorServices.Test.E2E/DebugAdapterProtocolMessageTests.cs
+++ b/test/PowerShellEditorServices.Test.E2E/DebugAdapterProtocolMessageTests.cs
@@ -2,140 +2,133 @@
// Licensed under the MIT License.
using System;
-using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
-using System.Threading;
using System.Threading.Tasks;
+using Nerdbank.Streams;
using OmniSharp.Extensions.DebugAdapter.Client;
using DapStackFrame = OmniSharp.Extensions.DebugAdapter.Protocol.Models.StackFrame;
-using OmniSharp.Extensions.DebugAdapter.Protocol.Events;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Client;
using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
using OmniSharp.Extensions.DebugAdapter.Protocol.Requests;
-using OmniSharp.Extensions.JsonRpc.Server;
using Xunit;
using Xunit.Abstractions;
-using Microsoft.Extensions.Logging.Abstractions;
+using OmniSharp.Extensions.JsonRpc.Server;
+using OmniSharp.Extensions.DebugAdapter.Protocol.Events;
namespace PowerShellEditorServices.Test.E2E
{
- public class XunitOutputTraceListener(ITestOutputHelper output) : TraceListener
- {
- public override void Write(string message) => output.WriteLine(message);
- public override void WriteLine(string message) => output.WriteLine(message);
- }
[Trait("Category", "DAP")]
- public class DebugAdapterProtocolMessageTests : IAsyncLifetime, IDisposable
+ // ITestOutputHelper is injected by XUnit
+ // https://xunit.net/docs/capturing-output
+ public class DebugAdapterProtocolMessageTests(ITestOutputHelper output) : IAsyncLifetime
{
- private static readonly bool s_isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
- private static readonly string s_testOutputPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
+ // After initialization, use this client to send messages for E2E tests and check results
+ private IDebugAdapterClient client;
- private readonly ITestOutputHelper _output;
- private DebugAdapterClient PsesDebugAdapterClient;
- private PsesStdioProcess _psesProcess;
+ private static readonly bool s_isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
///
- /// Completes when the debug adapter is started.
+ /// Test scripts output here, where the output can be read to verify script progress against breakpointing
///
- public TaskCompletionSource