Zoojay
Zoojay

Reputation: 143

How to easily run a python script from Visual Studio

Is there a way to easily run a currently active python file in Visual Studio? I'm used to Notepad++ in which I had customized it to run an active python file in cmd on ctrl+r which made testing code very easy and fast. If there was something similar I could do for Visual Studio, that would be wonderful.

Thanks!

Upvotes: 1

Views: 1651

Answers (1)

Natsfan
Natsfan

Reputation: 4837

Download the extension 'Code Runner'. You may need to restart visual studio code after loading. Open your script in an editor window. Hit the keys 'control-alt-n' and your script should run. I just checked it on my mac and it ran fine.

Upvotes: 2

Related Questions