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

Implment Variable List Toggling Function in Collab #88

Merged
merged 12 commits into from
Jan 19, 2025

Conversation

Anthony-Eid
Copy link
Collaborator

@Anthony-Eid Anthony-Eid commented Jan 14, 2025

This PR aims to implement variable list toggling while in collab sessions. This is one of the list steps until remote users have the same functionality as local users.

We used to send a SetDebugger message to all clients whenever build entries were called. This led to a lot of redundant information being shared between collab users. Now we only send two messages related to the variable list, a SetDebugger message for the initial scopes and first level of variables, then an AddVariables message whenever a new variable has been toggled.

Not that our bandwidth usage was an issue, but this should save bandwidth during debug sessions. In future iterations, I'm planning on updating the debugger collab DB schema to allow additions to variables without decoding, then encoding data.

I'll also add the OpenEntries to variable list messages again with a setting that allows users to de-sync from the collab sessions’ open variables and look at their own view.

###TODO:

  • Impl VariablesCommand
  • Sync entries across all collab users
  • Fix bug that causes remote collab users variable list's open entries to mimic the host's open entries when toggling from host
  • Sync entries across variable list collab DB without affecting open entries
  • Handle building entries locally instead of using collab DB to store extra information
  • Write test

Current State

Screen.Recording.2025-01-14.at.3.24.44.AM.mov

@@ -1207,6 +1207,17 @@ impl VariableList {
.into_any_element()
}

#[cfg(any(test, feature = "test-support"))]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we make toggle_variable just public? As it's just a proxy now

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we can, but that would mean it's available for any crate to use

@Anthony-Eid Anthony-Eid marked this pull request as ready for review January 19, 2025 23:58
@Anthony-Eid Anthony-Eid merged commit 1a5feff into RemcoSmitsDev:debugger Jan 19, 2025
10 checks passed
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