develop feature/agent-framework-poc fix/editor-text-visibility-chrome main ViewModels / MainWindowViewModel.DebugStackUi.cs csharp 4405de341 namespace CascadeIDE .ViewModels ;2 3 /// <summary>Выбор кадра в панели «Стек» Mfd: подгрузка Locals для выбранного кадра (DAP).</summary> 4 public partial class MainWindowViewModel 5 { 6 private int _debugStackSelectedIndex = -1 ; 7 private bool _suppressDebugStackSelectedIndex; 8 9 /// <summary>Индекс в <see cref= "Features.Instrumentation.InstrumentationPanelViewModel.DebugStackFrames" />; синхронизируется со снимком DAP .</summary> 10 public int DebugStackSelectedIndex 11 { 12 get => _debugStackSelectedIndex; 13 set 14 { 15 if (_debugStackSelectedIndex == value) 16 return ; 17 _debugStackSelectedIndex = value; 18 OnPropertyChanged (); 19 if (_suppressDebugStackSelectedIndex) 20 return ; 21 if (value < 0 ) 22 return ; 23 _ = RequestDebugFrameLocalsAsync (value); 24 } 25 } 26 27 async Task RequestDebugFrameLocalsAsync (int frameIndex) 28 { 29 try 30 { 31 await _dapDebug.SetVariablesFrameIndexAsync (frameIndex, default).ConfigureAwait (true ); 32 } 33 catch 34 { 35 // DAP/сессия — best-effort 36 } 37 } 38 } 39
View only · write via MCP/CIDE