Add SharpDbg
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
<PackageReference Include="NuGet.Protocol" />
|
||||
<PackageReference Include="ObservableCollections" />
|
||||
<PackageReference Include="R3" />
|
||||
<PackageReference Include="SharpDbg" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user