diff --git a/Directory.Packages.props b/Directory.Packages.props index 05581ac..e794444 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -55,6 +55,7 @@ + @@ -68,4 +69,4 @@ - \ No newline at end of file + diff --git a/src/SharpIDE.Application/Features/Debugging/DebuggerProcessStreamHelper.cs b/src/SharpIDE.Application/Features/Debugging/DebuggerProcessStreamHelper.cs index 6e3b1e6..2d9607a 100644 --- a/src/SharpIDE.Application/Features/Debugging/DebuggerProcessStreamHelper.cs +++ b/src/SharpIDE.Application/Features/Debugging/DebuggerProcessStreamHelper.cs @@ -1,5 +1,6 @@ using System.Diagnostics; using Ardalis.GuardClauses; +using SharpDbg.InMemory; using SharpIDE.Application.Features.Run; namespace SharpIDE.Application.Features.Debugging; @@ -9,6 +10,11 @@ public static class DebuggerProcessStreamHelper public static (Stream Input, Stream Output, bool IsNetCoreDbg) NewDebuggerProcessStreamsForInfo(DebuggerExecutableInfo? debuggerExecutableInfoNullable) { if (debuggerExecutableInfoNullable is not {} debuggerExecutableInfo) throw new ArgumentNullException(nameof(debuggerExecutableInfoNullable), "Debugger executable info cannot be null."); + if (debuggerExecutableInfo.UseInMemorySharpDbg) + { + var (input, output) = SharpDbgInMemory.NewDebugAdapterStreams(); + return (input, output, false); + } var debuggerExecutablePath = debuggerExecutableInfo.DebuggerExecutablePath; Guard.Against.NullOrWhiteSpace(debuggerExecutablePath, nameof(debuggerExecutablePath), "Debugger executable path cannot be null or empty."); var isNetCoreDbg = Path.GetFileNameWithoutExtension(debuggerExecutablePath).Equals("netcoredbg", StringComparison.OrdinalIgnoreCase); diff --git a/src/SharpIDE.Application/SharpIDE.Application.csproj b/src/SharpIDE.Application/SharpIDE.Application.csproj index 034e65a..ac69d1f 100644 --- a/src/SharpIDE.Application/SharpIDE.Application.csproj +++ b/src/SharpIDE.Application/SharpIDE.Application.csproj @@ -61,6 +61,7 @@ +