Skip to content

Leader mappings stop resolving after using VS Code debugger until window reload #9997

Description

@fauceta

Description

After using the VS Code debugger, VSCodeVim stops resolving custom leader mappings until the window is reloaded.

Important detail: Vim itself is still active and still receives keys.

  • Pressing <space> is still recognized as leader
  • The Vim log shows both keys being handled
  • Built-in Vim motions like w, b, and text objects such as ci( still work
  • Native VS Code shortcuts like Ctrl+Shift+P still work
  • Only custom leader mappings stop working
  • Developer: Reload Window restores the mappings immediately

Environment

  • VS Code version: 1.117.0
  • VSCodeVim version: 1.32.4
  • OS: Windows

Minimal configuration

{
  "vim.leader": "<Space>",
  "vim.useCtrlKeys": true,
  "vim.normalModeKeyBindings": [
    {
      "before": ["leader", "f"],
      "commands": ["workbench.action.quickOpen"]
    }
  ],
  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": ["leader", "<Space>"],
      "commands": ["workbench.action.showCommands"]
    }
  ]
}

Steps to reproduce

  1. Configure:
    • <space> f -> workbench.action.quickOpen
    • <space> <space> -> workbench.action.showCommands
  2. Verify both mappings work.
  3. Start and use a debug session.
  4. Return to the editor.
  5. Try the mappings again.

Result: mappings no longer execute until Developer: Reload Window.

This issue could be related: #7595

Vim debug log

2026-04-29 18:37:16.169 [debug] Handling key: <space>
2026-04-29 18:37:16.271 [debug] Handling key: f
2026-04-29 18:37:18.124 [debug] Status bar: -- NORMAL --
...
2026-04-29 18:37:37.095 [debug] Handling key: <space>
2026-04-29 18:37:37.535 [debug] Handling key: f

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions