Vim icon indicating copy to clipboard operation
Vim copied to clipboard

Custom Hotkeys and Vim Motions Not Working in Debug Mode

Open niklod opened this issue 1 year ago • 3 comments

Describe the bug
Custom hotkeys defined in the VSCodeVim extension do not work in debug mode. Even basic Vim motions are unresponsive when debugging.

To Reproduce
Steps to reproduce the behavior:

  1. Configure custom hotkeys in settings.json for VSCodeVim, e.g.:
    {
        "before": ["<leader>", "d", "c"],
        "commands": ["editor.debug.action.continue"]
    },
    {
        "before": ["<leader>", "d", "o"],
        "commands": ["workbench.action.debug.stepOver"]
    }
    
  2. Start debugging in VSCode.
  3. Attempt to use the custom hotkeys or basic Vim motions during the debug session.
  4. Observe that neither the hotkeys nor the Vim motions function.

Expected behavior Custom hotkeys and basic Vim motions should work seamlessly in debug mode, as they do outside of it.

Screenshots

https://github.com/user-attachments/assets/b7a5bdaa-96db-44c5-85f6-d678da456f41

Environment (please complete the following information): • Extension (VsCodeVim) version: v1.28.1 • VSCode version: 1.95.3 • OS: Darwin arm64 24.1.0 (MacOS 15.1.1)

Additional context The issue makes it difficult to debug efficiently while relying on Vim keybindings. If remapping-related logs are required, please specify, and I can attach them.

niklod avatar Nov 27 '24 19:11 niklod

The situation I encountered is that once I enter debugging mode and cannot use user custom vim key mappings, the default Vim mapping can still be used.

awaken233 avatar Dec 15 '24 15:12 awaken233

I'm seeing the same issue - from what I can tell, this only happens when the debug mode is entered through a custom <leader>... mapping, but not when starting the test debug by clicking in the UI.

E.g. the following keybinding will produce the error:

{
    "before": [
        "<leader>",
        "d",
        "c"
    ],
    "commands": [
        "testing.debugAtCursor"
    ]
},

bstadlbauer avatar Jan 09 '25 13:01 bstadlbauer

I have a very similar mapping, and can confirm the same behavior as bstadlbauer. Presumably that means that vscodevim is waiting for the custom leader mapping to "finish" before allowing further input, but that finish is "exit debugging"?

333fred avatar Aug 29 '25 20:08 333fred