mirror of
https://github.com/ZuneDev/ZuneUIXTools.git
synced 2026-07-27 13:11:59 -07:00
Implement source breakpoints
This commit is contained in:
@@ -79,8 +79,8 @@ public class IrisDebugAdapterClient : IDebuggerClient, IRemoteDebuggerState, IDi
|
||||
;
|
||||
}).ConfigureAwait(false);
|
||||
|
||||
var tcs = new TaskCompletionSource<object>();
|
||||
await tcs.Task;
|
||||
// TODO: How to keep the thread alive while the debug adapter is running?
|
||||
await Task.Delay(-1).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Iris.Debug.Symbols;
|
||||
using OmniSharp.Extensions.DebugAdapter.Protocol.Requests;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -18,7 +19,19 @@ internal class BreakpointHandler(DebugSymbolResolver symbolResolver)
|
||||
|
||||
foreach (var requestedBreakpoint in request.Breakpoints)
|
||||
{
|
||||
|
||||
var parts = requestedBreakpoint.InstructionReference.Split(['@'], 2);
|
||||
var loadUri = parts[0];
|
||||
var offset = Convert.ToUInt32(parts[1], 16);
|
||||
|
||||
IrisBreakpoint irisBreakpoint = new(loadUri, offset);
|
||||
Application.DebugSettings.Breakpoints.Add(irisBreakpoint);
|
||||
|
||||
DapBreakpoint dapBreakpoint = new()
|
||||
{
|
||||
Id = irisBreakpoint.GetHashCode(),
|
||||
InstructionReference = requestedBreakpoint.InstructionReference,
|
||||
};
|
||||
dapBreakpoints.Add(dapBreakpoint);
|
||||
}
|
||||
|
||||
SetInstructionBreakpointsResponse response = new()
|
||||
|
||||
Reference in New Issue
Block a user