Skip to content
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

Add global and "by reference" watches #525

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

mvanderkamp
Copy link
Contributor

Addresses #511

Allows modifying watch expressions in two ways:

  1. Whether to show the watch expression in all frames as opposed to only the current frame
  2. Whether to continually re-evaluate the watch expression or evaluate it when it is created, cache the result, and watch changes to this value over time. If the value appears in the current local or global namespaces, it's current name is shown in parentheses.

@mvanderkamp mvanderkamp force-pushed the global_watch branch 2 times, most recently from 1707058 to 9f20770 Compare June 29, 2022 18:26
@mvanderkamp
Copy link
Contributor Author

Actually what do you think of making all watches "global"? That's usually how I want watches to behave.

@mvanderkamp
Copy link
Contributor Author

Hmm just as well I'm not entirely happy with the state of this- we don't have access to the right InspectInfo for global watches since it's still being cached at the frame level, so the global watches are presented differently (display type, show detail, etc) in each frame.

@mvanderkamp
Copy link
Contributor Author

Also, any thoughts on the UI for this stuff? I went with "expression"/"reference" since that made sense to me at the time but "by name"/"by value" might make more sense. And how cumbersome is it to have potentially 4 different kinds of watches?

@raphCode
Copy link
Contributor

Haven't read up all the watch-related stuff, but here is a late night thought:
What about showing (some) watch values only when their evaluation does not fail? Put differently, hiding all watches that yield a WatchEvalError.

This is what comes to mind after seeing the behavior of #150, which saves watch expressions and loads them in every entered frame, which of course fails in many cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants