clear debug panel trees on debugger continue
This commit is contained in:
@@ -171,24 +171,28 @@ public class DebuggingService
|
||||
{
|
||||
await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding);
|
||||
var nextRequest = new NextRequest(threadId);
|
||||
GlobalEvents.Instance.DebuggerExecutionContinued.InvokeParallelFireAndForget();
|
||||
_debugProtocolHost.SendRequestSync(nextRequest);
|
||||
}
|
||||
public async Task StepInto(int threadId, CancellationToken cancellationToken)
|
||||
{
|
||||
await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding);
|
||||
var stepInRequest = new StepInRequest(threadId);
|
||||
GlobalEvents.Instance.DebuggerExecutionContinued.InvokeParallelFireAndForget();
|
||||
_debugProtocolHost.SendRequestSync(stepInRequest);
|
||||
}
|
||||
public async Task StepOut(int threadId, CancellationToken cancellationToken)
|
||||
{
|
||||
await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding);
|
||||
var stepOutRequest = new StepOutRequest(threadId);
|
||||
GlobalEvents.Instance.DebuggerExecutionContinued.InvokeParallelFireAndForget();
|
||||
_debugProtocolHost.SendRequestSync(stepOutRequest);
|
||||
}
|
||||
public async Task Continue(int threadId, CancellationToken cancellationToken)
|
||||
{
|
||||
await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding);
|
||||
var continueRequest = new ContinueRequest(threadId);
|
||||
GlobalEvents.Instance.DebuggerExecutionContinued.InvokeParallelFireAndForget();
|
||||
_debugProtocolHost.SendRequestSync(continueRequest);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ public class GlobalEvents
|
||||
public EventWrapper<SharpIdeProjectModel, Task> ProjectStartedRunning { get; } = new(_ => Task.CompletedTask);
|
||||
public EventWrapper<SharpIdeProjectModel, Task> ProjectStoppedRunning { get; } = new(_ => Task.CompletedTask);
|
||||
public EventWrapper<ExecutionStopInfo, Task> DebuggerExecutionStopped { get; } = new(_ => Task.CompletedTask);
|
||||
public EventWrapper<Task> DebuggerExecutionContinued { get; } = new(() => Task.CompletedTask);
|
||||
/// A document changed, project was reloaded etc. Document changes include unsaved changes in the IDE.
|
||||
public EventWrapper<Task> SolutionAltered { get; } = new(() => Task.CompletedTask);
|
||||
|
||||
|
||||
@@ -27,10 +27,11 @@ public partial class ThreadsVariablesSubTab : Control
|
||||
_stackFramesTree = GetNode<Tree>("%StackFramesTree");
|
||||
_variablesTree = GetNode<Tree>("%VariablesTree");
|
||||
GlobalEvents.Instance.DebuggerExecutionStopped.Subscribe(OnDebuggerExecutionStopped);
|
||||
GlobalEvents.Instance.DebuggerExecutionContinued.Subscribe(ClearAllTrees);
|
||||
_threadsTree.ItemSelected += OnThreadSelected;
|
||||
_stackFramesTree.ItemSelected += OnStackFrameSelected;
|
||||
_variablesTree.ItemCollapsed += OnVariablesItemExpandedOrCollapsed;
|
||||
Project.ProjectStoppedRunning.Subscribe(ProjectStoppedRunning);
|
||||
Project.ProjectStoppedRunning.Subscribe(ClearAllTrees);
|
||||
}
|
||||
|
||||
private void OnVariablesItemExpandedOrCollapsed(TreeItem item)
|
||||
@@ -64,10 +65,11 @@ public partial class ThreadsVariablesSubTab : Control
|
||||
public override void _ExitTree()
|
||||
{
|
||||
GlobalEvents.Instance.DebuggerExecutionStopped.Unsubscribe(OnDebuggerExecutionStopped);
|
||||
Project.ProjectStoppedRunning.Unsubscribe(ProjectStoppedRunning);
|
||||
GlobalEvents.Instance.DebuggerExecutionContinued.Unsubscribe(ClearAllTrees);
|
||||
Project.ProjectStoppedRunning.Unsubscribe(ClearAllTrees);
|
||||
}
|
||||
|
||||
private async Task ProjectStoppedRunning()
|
||||
private async Task ClearAllTrees()
|
||||
{
|
||||
await this.InvokeAsync(() =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user