-
Notifications
You must be signed in to change notification settings - Fork 793
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
fire event when a value is bound at the root of a script evaluation #7919
Conversation
I may be OT here, but 'given an identifier's name' is not enough, as often the same names are in scope. We'd need name and location in source to du that correctly. Currently, in VS, the locals window works (it'll show multiple times the same name, but with different values), but hovering over a value doesn't. Neither the correct stack frame, nor the actual value belonging to the variable will be shown when names overlap. |
If using this in a debugger then yes, you'll need the location to properly map an identifier to a variable, but in a script context where this is to be used the source location is essentially line 1, column 0. The added function could have been implemented as |
@abelbraaksma So ...
Essentially, the only retrievable item is the top level a.
if a had been assigned a different value prior to this code submission then it is no longer retrievable. And if a was defined twice in a single submission then it would generate a duplicate definition error.
I hope this helps. |
After speaking with @KevinRansom and finding a better place to add the relevant event, I've decided to remove the function The benefit is that this PR is now much simpler. Thanks to @abelbraaksma and Kevin for the probing questions that led to a better implementation and design. |
…otnet#7919) * fire event when a value is bound at the root of a script evaluation * simplify event notifying bound values in interactive
Also adds a function to get runtime type and value given a (root) identifier's name.This is to enable a hypothetical "watch" or "locals" window in notebooks.