Skip to content

Commit fb4621c

Browse files
committed
Improvements to locals state saving
There's still a case on first debugger run where the state may be lost.
1 parent 823a9af commit fb4621c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

External/Plugins/FlashDebugger/Debugger/DebuggerManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ private void UpdateLocalsUI()
523523
Variable thisValue = m_FlashInterface.GetThis(m_CurrentFrame);
524524
Variable[] args = m_FlashInterface.GetArgs(m_CurrentFrame);
525525
Variable[] locals = m_FlashInterface.GetLocals(m_CurrentFrame);
526-
PanelsHelper.localsUI.TreeControl.SaveState();
526+
if (PanelsHelper.localsUI.TreeControl.Nodes.Count > 0) PanelsHelper.localsUI.TreeControl.SaveState();
527527
PanelsHelper.localsUI.Clear();
528528
if (thisValue != null)
529529
{

External/Plugins/FlashDebugger/Helpers/MenusHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ public void UpdateMenuState(object sender, DebuggerState state)
267267
CurrentButton.Enabled = CurrentMenu.Enabled = RunToCursorButton.Enabled = enabled;
268268
NextButton.Enabled = NextMenu.Enabled = FinishButton.Enabled = FinishMenu.Enabled = enabled;
269269
RunToCursorMenu.Enabled = StepButton.Enabled = StepMenu.Enabled = enabled;
270-
if (state == DebuggerState.Running)
270+
if (state == DebuggerState.Running && !PluginMain.debugManager.FlashInterface.isDebuggerSuspended)
271271
{
272272
PanelsHelper.localsUI.TreeControl.Nodes.Clear();
273273
PanelsHelper.stackframeUI.ClearItem();

0 commit comments

Comments
 (0)