set initial breakpoints

This commit is contained in:
Matt Parker
2025-08-25 21:26:53 +10:00
parent 97dcfd2d4c
commit ef46c94b30
5 changed files with 47 additions and 10 deletions

View File

@@ -5,6 +5,7 @@ using AsyncReadProcess;
using SharpIDE.Application.Features.Debugging;
using SharpIDE.Application.Features.Evaluation;
using SharpIDE.Application.Features.Events;
using SharpIDE.Application.Features.SolutionDiscovery;
using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence;
namespace SharpIDE.Application.Features.Run;
@@ -12,6 +13,7 @@ namespace SharpIDE.Application.Features.Run;
public class RunService
{
private readonly ConcurrentDictionary<SharpIdeProjectModel, SemaphoreSlim> _projectLocks = [];
public ConcurrentDictionary<SharpIdeFile, List<Breakpoint>> Breakpoints { get; } = [];
public async Task RunProject(SharpIdeProjectModel project)
{
var isDebug = true;
@@ -83,7 +85,7 @@ public class RunService
{
// Attach debugger (which internally uses a DiagnosticClient to resume startup)
var debuggingService = new Debugger { Project = project, ProcessId = process.ProcessId };
await debuggingService.Attach(project.RunningCancellationTokenSource.Token).ConfigureAwait(false);
await debuggingService.Attach(project.RunningCancellationTokenSource.Token, Breakpoints.ToDictionary()).ConfigureAwait(false);
}
project.Running = true;