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

Correctly refetch/invalidate stackframes/scopes/variables #55

Merged
merged 6 commits into from
Oct 26, 2024

Conversation

RemcoSmitsDev
Copy link
Owner

@RemcoSmitsDev RemcoSmitsDev commented Oct 25, 2024

Issue breakdown

Prior to this PR, our approach was to invalidate variables and attempt to refetch existing ones based on known container references. This method proved problematic because all objects (stack frames, scopes, variables) should be considered stale after an object modification.

This was the primary reason why, when trying to refetch variables with current container references, we often failed to see nested variables appear. The issue was twofold: not only did reusing stale container references prevent nested variables from showing up, but we also used the variable reference as unique id to determine what variable to show, which changes when an object was modified or when moving to the next frame.

To address this issue, I've implemented two key changes:

  1. I modified the unique ID used to determine which entry to display. Now, we only use the variable's depth and name, as these two attributes remain constant over time.

  2. I altered the variable fetching mechanism. We now retrieve all previously opened variables, eliminating the need to repeatedly click open the same variable during step debugging.

These changes should significantly improve the reliability and user experience of the debugging process.

Example

Before

Screen.Recording.2024-10-25.at.19.49.00.mov

After

Screen.Recording.2024-10-25.at.19.38.35.mov

@RemcoSmitsDev RemcoSmitsDev marked this pull request as ready for review October 26, 2024 14:26
@RemcoSmitsDev RemcoSmitsDev merged commit a45aa3d into debugger Oct 26, 2024
2 of 6 checks passed
@RemcoSmitsDev RemcoSmitsDev deleted the correctly-refetch-variables branch October 26, 2024 14:27
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.

1 participant