using SharpIDE.Application.Features.SolutionDiscovery;
using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence;

namespace SharpIDE.Application.Features.Debugging;

public class Debugger
{
	public required SharpIdeProjectModel Project { get; init; }
	public required int ProcessId { get; init; }
	private DebuggingService _debuggingService = new DebuggingService();
	public async Task Attach(CancellationToken cancellationToken, Dictionary<SharpIdeFile, List<Breakpoint>> breakpointsByFile)
	{
		await _debuggingService.Attach(ProcessId, breakpointsByFile, cancellationToken);
	}

	public async Task StepOver(int threadId, CancellationToken cancellationToken = default) => await _debuggingService.StepOver(threadId, cancellationToken);
	public async Task<ThreadsStackTraceModel> GetInfoAtStopPoint() => await _debuggingService.GetInfoAtStopPoint();
}
