Home > Software engineering >  How to change default app for .py to VSCode or to run when clicked?
How to change default app for .py to VSCode or to run when clicked?

Time:03-24

I installed PyCharm, but later I found out that VSCode is better. Even later I found out you can run the code inside a file without compiling it and without opening an editor. My questions are:

  1. How can I change the default app for .py to VSCode?
  2. How can I set it to run when clicked on it without any app?

P.S. - I was having a little fun with regedit before and found that Python has its own set of reg keys. Can it help? (I'm on Windows.)

CodePudding user response:

In Windows 10 Right-Click on the file. Click on Open With and choose Other Apps. Here you should see Visual Studio Code. Click on it and on the bottom select "Always open .py files with this app".

(I use Linux as my main system, so I tried to remember the names of the Button. So I dont know if it is the correct spelling and text. I am sorry for that.)

CodePudding user response:

enter image description here

enter image description here

Right click the file → open with → Choose another app → Check vscode and check the line below

  • Related