Skip to content

Keyboard shortcut issue: Running the contributed command: 'python.debugInTerminal' failed. #17374

Description

@xl-huo

Environment data

  • VS Code version: 1.60.0
  • Extension version (available under the Extensions sidebar): v2021.9.1218897484
  • OS and version: Windows_NT x64 10.0.19042
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.7
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Relevant/affected Python-related VS Code extensions and their versions:
    • name: Visual Studio Code Remote - SSH
    • version: v0.65.7
  • Value of the python.languageServer setting: Pylance language server 2021.9.1

Expected behaviour

I set the command “Python: Debug Python File in Terminal” (command id: python.debugInTerminal) shortcut and make sure the shortcut does not conflict with other commands'.
It is expected to run the debugging command of python in terminal, just like how vscode behaviors when I click on the "Python: Debug Python File in Terminal" button on the top right of the text editor.

Actual behaviour

When I type in the keyboard shortcut of command "Python: Debug Python File in Terminal" (no matter what shortcut I set), vscode shows this error message: "Running the contributed command: 'python.debugInTerminal' failed."
(But the button "Python: Debug Python File in Terminal" works fine when clicked).

Steps to reproduce:

bug

Logs

This log message is showed on the Log (Remote Extension Host) after the error happens:

[2021-09-11 02:57:47.690] [exthost] [error] TypeError: Cannot read property 'fsPath' of undefined
	at f.getDebugConfiguration (/data4/hxl/.vscode-server/extensions/ms-python.python-2021.9.1218897484/out/client/extension.js:59:718321)
	at async /data4/hxl/.vscode-server/extensions/ms-python.python-2021.9.1218897484/out/client/extension.js:59:717879
	at async _executeContributedCommand (/data4/hxl/.vscode-server/bin/e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff/out/vs/server/remoteExtensionHostProcess.js:94:110871) python.debugInTerminal

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions