Repository navigation
fix: Jump to Value Source on a value of an earlier stop says so, instead of sending that stop's location reference - #2180
Merged
lagergren merged 1 commit intoNov 24, 2026
Conversation
…ead of sending that stop's location reference A 'valueLocationReference' has the lifetime of a 'variablesReference': it is valid only until the program resumes. An Evaluate result stays in its dialog across a step, and "Jump to Value Source" sent its reference to the debug adapter at the next stop, which then answered an error, or the location of another value. The action now sends the 'locations' request with sendInExecutionEpoch, as Set Value sends its requests since redhat-developer#2150, and says "The program has run since this value was shown: show it again to jump to the source of its value." DAPClient.locations writes its request on the calling thread, as the other requests do, so that the check and the write are atomic against a resume; the action calls it off the EDT. sendInExecutionEpoch gets an overload with the message of a refused request. Fixes redhat-developer#2177
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2180 +/- ##
==========================================
- Coverage 54.13% 54.09% -0.05%
==========================================
Files 831 831
Lines 35275 35278 +3
Branches 5527 7273 +1746
==========================================
- Hits 19096 19083 -13
- Misses 13361 13366 +5
- Partials 2818 2829 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
@coderabbitai review |
Action performed
|
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2177
What
A
valueLocationReferencehas the lifetime of avariablesReference: it is valid only until the program resumes. AnEvaluate result stays in its dialog across a step. "Jump to Value Source" (#2172) on it then sent the reference of the
earlier stop to the debug adapter. The adapter answered with an error, or with the location of another value, and the
editor opened a wrong place.
Change
DAPJumpToValueSourceActionsends thelocationsrequest withDAPClient.sendInExecutionEpoch, with theexecution epoch of the value's frame, as Set Value has sent its requests since feat: set the value of an Evaluate result with the DAP setExpression request #2150. On a value of an earlier stop,
no request is sent, and the session reports "Cannot locate the source of the value of 'onClick': The program has run
since this value was shown: show it again to jump to the source of its value."
DAPClient.locationswrites its request on the calling thread, as LSP4J and the other requests ofDAPClientdo. Before, it wrote it from a pool thread, which would have left the check and the write of
sendInExecutionEpochno longer atomic against a resume. The action now calls it off the EDT.locationswas addedby feat: jump from a DAP variable to the source of its value, with the locations request #2172 and isn't released yet.
DAPClient.sendInExecutionEpochgets an overload with the message of a refused request. The existing method keepsSet Value's message.
Tests
DAPJumpToValueSourceSessionTest.testJumpToValueSourceOfAnEvaluateResultOfAnEarlierStopSendsNoRequest:evaluate an expression whose result has a
valueLocationReference, have the debug adapter stop again, then run theaction on the kept result. It expects no
locationsrequest, the message, and no editor. It fails without thechange, because the stale reference is sent, and passes with it.
sendInExecutionEpoch.dap.*tests pass on IC 2024.2, 2025.3 and IU 2026.3: 431 each, with 0 failures or skipped.Behaviour change