Programmers learn & share
0 votes

Problem :

I have just downloaded Python and Visual Studio & trying to test the debugging feature for a simple "Hello World" script but I'm receiving this error:

failed to launch the python process, please validate the path 'python'

Could someone please tell me how to fix this?

by (6.9k points)   | 93 views

1 Answer

0 votes


1.Your old launch.json file might be causing this issue, due to the recent updates of launch.json file format and structure. 

2. Try to delete launch.json file in the .vscode folder. The .vscode folder exists in your workspace where your source code exists, not to be confused with the one in your user home folder (C:\Users\{username}\.vscode).

3.This workaround worked for me with Windows10 + Visual Studio Code + Python extension. Just delete the existing launch.json and restart Visual Studio Code, and then start your debugging. 

4.The launch.json file will be regenerated again, but this time it should be in the correct shape.

Further Readings:

by (36.1k points)  
edited by
2,227 questions
2,734 answers
241 users