-
Notifications
You must be signed in to change notification settings - Fork 44
Interactive State-Space Navigation with Successor Selection and Backtracking #475
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements an interactive state-space navigation feature for the TLA+ debugger, allowing users to navigate between states using a "Go to State" command. This is the frontend implementation corresponding to backend changes in tlaplus/tlaplus#1270.
Key Changes
- Added a debug adapter tracker to detect the
supportsGotoStatecapability from the backend debugger - Implemented a
gotoStatecommand that sends custom DAP requests to navigate to specific states - Added UI integration through context menu and keyboard shortcut (ctrl+g/cmd+g) in the variables view
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/main.ts | Registers the new TLADebugAdapterTrackerFactory and gotoState command with VS Code extension context |
| src/debugger/debugging.ts | Implements the tracker factory to detect backend capabilities and the gotoState function to handle state navigation |
| package.json | Defines the command, adds it to the debug variables context menu, and configures the keyboard shortcut |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e28b6b4 to
2ad8a60
Compare
- Introduced a new command `tlaplus.debugger.gotoState` to navigate to a specific state in the TLA+ debugger. - Registered the command in the command palette and added a keyboard shortcut (Ctrl+G / Cmd+G). - Updated context menu for debug variables to include the new command. [Feature] Signed-off-by: Markus Alexander Kuppe <[email protected]>
- Added TLADebugAdapterTrackerFactory to monitor debug adapter protocol messages. - Tracks supportsGotoState capability from the debugger backend's initialize response. - Updated package.json when clauses to conditionally show command in context menu and keybindings. - Command now only appears when the debugger explicitly declares support for the feature. [Feature] Signed-off-by: Markus Alexander Kuppe <[email protected]>
- Updated debug/variables/context menu when clause to check debugProtocolVariableMenuContext == 'state'. - The TLA+ debugger backend sets __vscodeVariableMenuContext property on state variables. - Command now only appears for actual state variables, preventing invocation on non-state variables. - Improves UX by hiding the command when it is not applicable. [Feature] Signed-off-by: Markus Alexander Kuppe <[email protected]>
2ad8a60 to
f317aa4
Compare
Frontend of tlaplus/tlaplus#1270
Limitations
The “Go to State” context menu appears even when it’s not relevant to the current tree item.