vscode 'jupyter run selection/line in interactive window' shortcut not working

Question:

I want to use a keyboard shortcut for jupyter run selection/kine in interactive window in vscode but it’s not working.

I also checked VS Code "Run selection/line in Python interactive window" not working at all which implies that there is a version problem but I don’t have that version(my version is v2022.4.1), besides it says "it’s not working at all" but mine is working when I right click and click on "Run selection/line in Python interactive window".

the when expression also follows by editorTextFocus && isWorkspaceTrusted && jupyter.ownsSelection && !findInputFocussed && !notebookEditorFocused && !replaceInputFocussed && editorLangId == 'python'

by the way there is no other conflict wit my key bindings. so is there any way to solve this?

Asked By: Farhang Amaji

||

Answers:

Could you try to switch the shortcut of this command? Maybe some other programs occupy this shortcut.

Answered By: Steven-MSFT

Despite this working for me via a right click, i still had to select this in the GUI version of settings -> Jupyter: Send Selection To Interactive Window. Then my chosen keybinding also worked. This solution was found and explained more fully at:

https://superuser.com/questions/1461655/vs-code-shiftenter-does-not-send-code-to-python-interactive-why

Answered By: JonB451
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.