Fix "Add to Watch" from hover window using "hover" instead of variable name#334
Merged
Fix "Add to Watch" from hover window using "hover" instead of variable name#334
Conversation
Collaborator
|
@copilot 请使用中文 |
Fixed the bug where adding a variable to watch from hover window would incorrectly use "hover" as the variable name instead of the actual expression name. The issue was in run_hover() passing parameters in wrong order to variables.createRef(). Changed: variables.createRef(res, "hover") To: variables.createRef(res, expression, "hover") This now matches the correct implementation used in run_watch(). Co-authored-by: sumneko <5213431+sumneko@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix bug in hover window during add to watch action
Fix "Add to Watch" from hover window using "hover" instead of variable name
Dec 31, 2025
Contributor
Author
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where adding a variable to watch from the hover window context menu incorrectly displayed "hover" as the variable name instead of the actual expression.
Key Change:
- Fixed parameter order in
variables.createRef()call withinrun_hover()to passexpressionas theevaluateNameparameter instead of the hardcoded string "hover"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fesily
pushed a commit
to fesily/lua-debug
that referenced
this pull request
Jan 8, 2026
…e name (actboy168#334) * Initial plan * Fix hover window "Add to Watch" parameter order bug Fixed the bug where adding a variable to watch from hover window would incorrectly use "hover" as the variable name instead of the actual expression name. The issue was in run_hover() passing parameters in wrong order to variables.createRef(). Changed: variables.createRef(res, "hover") To: variables.createRef(res, expression, "hover") This now matches the correct implementation used in run_watch(). Co-authored-by: sumneko <5213431+sumneko@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sumneko <5213431+sumneko@users.noreply.github.com>
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.
When adding a variable to watch from the hover window context menu, the watch entry displays "hover" as the variable name instead of the actual expression. Adding from the variables window works correctly.
Root Cause
run_hover()passes wrong argument order tovariables.createRef():Function signature is
createRef(value, evaluateName, context). The bug caused evaluateName to be hardcoded as "hover" instead of using the actual variable expression.Changes
run_hover()to match working implementations inrun_watch()andrun_repl()Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.