Repro
- Start a debug session in TUI (`vimcode --tui`, F5).
- Step over the function entry (so DAP reports a local scope with multiple vars).
- In the variables tree, observe that `local: args` has an expand chevron and can be opened to show fields.
- Step over more lines that introduce additional locals (e.g. `let debug_log = ...`, `let skip_args = ...`).
- Try to expand any of the newly-created variables.
Expected: any aggregate / non-primitive variable should show an expand chevron and reveal child fields when activated.
Actual: newly-introduced variables show no chevron and don't expand. Only the original `args` variable is expandable across the entire session.
Suspected cause
Likely one of:
- DAP `variablesReference` is non-zero only for the initially-requested variables; subsequent locals get returned without it.
- Engine cache (`Engine::dap_variables`) is keyed on the first scope_id and not refreshed when new locals enter scope.
- The lazy-load logic only fires for the row the user EXPANDED at session start; new rows have no expand state slot.
Files
- `src/core/dap.rs` — DAP variable response parsing
- `src/core/dap_manager.rs` — variable lazy-load + caching
- `src/core/engine/dap_ops.rs` — `Engine::dap_variables`, scope/var management
- `src/render.rs::build_var_tree` — render-side tree construction
Reference
Memory note (Session 95) mentions the build_var_tree includes group headers; possibly the chevron is only rendered for entries with non-empty children, and DAP's lazy-loaded variables show empty children until expanded.
Priority
Medium — debugging is much less useful when only one variable per session is inspectable.
Repro
Expected: any aggregate / non-primitive variable should show an expand chevron and reveal child fields when activated.
Actual: newly-introduced variables show no chevron and don't expand. Only the original `args` variable is expandable across the entire session.
Suspected cause
Likely one of:
Files
Reference
Memory note (Session 95) mentions the build_var_tree includes group headers; possibly the chevron is only rendered for entries with non-empty children, and DAP's lazy-loaded variables show empty children until expanded.
Priority
Medium — debugging is much less useful when only one variable per session is inspectable.