-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not supplying evaluateName
does not hide "Add to Watch"
#47078
Comments
If there is no I understand this is not conforming with the docs. So we should either
Currently I think that using the name when evaluateName is missing might not be a bad strategy, but am overall open for suggestions. |
I'd be fine with it falling back to So, if the docs are going to be changed (and the actions are not removed), I think it's a bug that "Add to watch" isn't filling in the name (it might not be the only thing that might not be falling back to |
@DanTup It is very strange that it is not falling back to name for you Can you put a breakpoint there and investigate deeper what is going on |
Hmm, that is strange - I'll do some investigation. When it didn't work, I found #25166 and assumed it was intended that I'll dig more and post back next week though! |
@isidorn Ok, I looked at this code again: const name = this.expression instanceof Variable ? this.expression.evaluateName : this.expression.name; This is not falling back to Shouldn't it be something like: const name = this.expression instanceof Variable && this.expression.evaluateName ? this.expression.evaluateName : this.expression.name; ? |
Also; I still think the behaviour mentioned in the linked comment at the top would be good - what happens if we fabricate a variable for the Variables window (eg. an exception) and don't have a good way to add it to the |
@DanTup makes sense, thanks for feedback |
Super, thanks! 👍 |
Checked in Insiders, seems to work as expected. Thanks! |
According to #25166:
However, the context menu still seems to show
Add to Watch
in the Variables display, and when clicking it it adds an empty expression to the watch window.It's not a bad thing - I never implemented
evaluateName
(oops) since I incorrectly expected it to fall back toname
(I'm fixing that now though!).The text was updated successfully, but these errors were encountered: