herzyreal
herzyreal

Reputation: 1

How to set Python console in VS Code?

This is my first question here. I just moved from Spyder to VS Code and in Spyder if I wanted to run my code I would just press F5 and it would run in the console, but in VS Code I need to press F5 then enter and wait a bit until the powershell runs the file and then see the output. Is there a way to make that faster?

Thank you very much!

Upvotes: 0

Views: 111

Answers (1)

Brad Figueroa
Brad Figueroa

Reputation: 875

Yep, you can do it by setting a shortcut editing keybindings.json file. Pressing ctrl + k + s (if you haven't changed before) you can open it and then type run python file in terminal, then click on it and set the shortcut that you wanna press to run the current python file. I'm attaching an image to support the explanation.

enter image description here

Upvotes: 1

Related Questions