Home > Blockchain >  VSCode API says command does not exist which is not referenced anywhere in extension
VSCode API says command does not exist which is not referenced anywhere in extension

Time:11-23

I am creating an extension for VSCode. I have bound a key binding to a command. Later, I changed the name of this command in the key binding, extension.js, activation events and on the actual contribution point of the command. I have made sure multiple times that everything is consistent with the new name of the command. Today, I attempt to run the extension. I test the key binding, and it says: command not found This is strange as there is no occurrence of the old command name in any of the code I have written.

Additionally, I have packaged it and installed the extension locally. It still gives the same result. In the packaged code, there is no instances of the old command name being there. I don't know why it is happening, is it an issue with git?

CodePudding user response:

You most probably still have the old extension command referenced in your keybindings.json. If my assumption is correct, you've manually added a binding via your settings and there's nothing wrong with the extension, you just haven't updated your settings to reflect the change.

  • Related