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

When using workbench.action.debug.callStack{Up,Down}, focus does weird things #203556

Closed
carschandler opened this issue Jan 26, 2024 · 2 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@carschandler
Copy link

Does this issue occur when all extensions are disabled?: I have to have the MS Python extensions installed at a minimum to be able to launch the debugger, but disabling all other extensions, yes this issue still occurs.

  • VS Code Version: 1.86.0-insider (Commit eff7c8a7e1c82320380f42d898a1e03051fefb7)
  • OS Version: Windows 11 (Connected to WSL via Arch Linux)

I try to avoid using the mouse if at all possible. When using the aforementioned commands to navigate the call stack via the keyboard, I would ideally have my focus placed in the editor window where the new call stack location is, ready to navigate and make edits, but instead, my focus is placed in some kind of limbo. I can sometimes press Tab to shift my focus to the editor, but then comes a secondary issue: when I try to use the arrow keys to move my cursor around (attempting to type text/pressing Escape doesn't help either), I am in some kind of locked state where I can't navigate or type even though my focus is on the editor (my cursor shows up, showing me that I am focused). This happens even when I use the workbench.action.focusActiveEditorGroup to ensure that I am focused on the editor. If I shift focus to some other panel and then back to the editor, I am dropped out of this locked state. This issue seems to happen especially when switching to the next item in the stack has moved me into a new file; most of these issues don't happen when moving locations within the same file.

The text where the call occurred is also selected by default when moving up/down the stack, which I find to be slightly annoying since it is easily deleted on accident, and I'd prefer to just have my cursor placed at the start or end of that selection and have no text selected at all, but I can understand this choice.

To clarify, expected behavior would be to just ensure that my editor is focused and ready to type right after the call stack switch occurs.

I've only tried this using Python/debugpy, but I can't imagine that this has anything to do with the language/debugger used.

Steps to Reproduce:

  1. Open a project with multiple files
  2. Set a breakpoint somewhere that will cause a few items to be added to the call stack
  3. Launch debugger
  4. Use workbench.action.debug.callStack{Up,Down} (either by command palette or create keyboard shortcut) to navigate Up/Down the call stack (especially from one file to another)
  5. Try to find out where your focus currently is inside the window
  6. Try to shift focus back to the editor
  7. Try to type/navigate inside the editor
@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues labels Jan 26, 2024
@roblourens roblourens added this to the Backlog milestone Jan 26, 2024
roblourens added a commit that referenced this issue Jan 26, 2024
@roblourens roblourens modified the milestones: Backlog, February 2024 Jan 26, 2024
@VSCodeTriageBot VSCodeTriageBot added the unreleased Patch has not yet been released in VS Code Insiders label Jan 26, 2024
@VSCodeTriageBot VSCodeTriageBot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Feb 1, 2024
@TylerLeonhardt
Copy link
Member

While this is verified for workbench.action.debug.callStack{Up,Down} I still get the bad behavior for workbench.action.debug.callStackTop and workbench.action.debug.callStackBottom and feel like those commands should have a similar change.

When I run workbench.action.debug.callStack{Top,Bottom} focus is lost from the editor.

@carschandler
Copy link
Author

Agreed @TylerLeonhardt!

@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants