Visual Studio Code with Jupyter Notebook: Shortcut for “run all”?

ElConrado picture ElConrado · Mar 21, 2019 · Viewed 8.3k times · Source

I have python script with jupyter notebook mark #%% which describe that I can run this script in visual studio code python interactive.

Acccording to this:

Jupyter/IPython Notebooks: Shortcut for "run all"?

I have similar question because described solution does not work in my case. How to specify shortcut for jupyter notebook command 'run all' in visual studio code?

Answer

Nick picture Nick · Mar 21, 2019

You can create your own keyboard shortcut by modifying the keybindings.json file by clicking on

File > preferences > keyboard shortcuts

Then clicking on the link - (bottom right of the image below) enter image description here

You can also install the code runner extension.

Code runner will add a play button on the top right of the vs code window, which you can click to run your code.