diff --git a/UI/Debugger/Utilities/DebugWorkspaceManager.cs b/UI/Debugger/Utilities/DebugWorkspaceManager.cs index bfe22765..b20f9c66 100644 --- a/UI/Debugger/Utilities/DebugWorkspaceManager.cs +++ b/UI/Debugger/Utilities/DebugWorkspaceManager.cs @@ -282,6 +282,8 @@ namespace Mesen.Debugger.Utilities LabelManager.ResetLabels(); BreakpointManager.ClearBreakpoints(); + WatchManager.ClearEntries(); + if(dbgWorkspace.WorkspaceByCpu.Count == 0) { DefaultLabelHelper.SetDefaultLabels(); } else { diff --git a/UI/Debugger/WatchManager.cs b/UI/Debugger/WatchManager.cs index 849afb08..eb92882b 100644 --- a/UI/Debugger/WatchManager.cs +++ b/UI/Debugger/WatchManager.cs @@ -37,6 +37,13 @@ namespace Mesen.Debugger return manager; } + public static void ClearEntries() + { + foreach(WatchManager wm in _watchManagers.Values) { + wm.WatchEntries = new(); + } + } + public WatchManager(CpuType cpuType) { _cpuType = cpuType;