You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DAP: Jump to Source on a lazy variable uses its declaration location after Show value #2186
Jump to Source on a DAP variable opens its declaration when the variable has a declarationLocationReference (#2182).
For a lazy variable (presentationHint.lazy), after "Show value" the value shows the resolved child variable, and
Jump to Source uses that child's reference. If only the lazy variable had a declarationLocationReference, Jump to
Source falls back to searching the variable's name, although the debug adapter gave the declaration.
Expected
When the shown variable has no declarationLocationReference, use the lazy variable's own.
How it could be done
In DAPValue.getDeclarationSourcePosition, take the reference of the shown variable, else of the variable itself.
vscode-js-debug marks getters lazy, but doesn't give declarations; lldb-dap gives declarations. So check whether an
adapter gives both before relying on it.
Test
In DAPJumpToDeclarationSessionTest: a lazy variable with a declarationLocationReference, whose resolved child has
none. After "Show value", Jump to Source opens the declaration.
Activity
feat: Jump to Source on a lazy DAP variable opens its declaration aft…