[Solved] The Python path in your debug configuration is invalid

Python Mohit Mozumder

Problem: While running my python project i got this error in vs code

The Python path in your debug configuration is invalid

How to solve this?


Solution:

Add python path in Vscode

1. See File -> Preferences -> Settings 
2. Click the “Open Settings (JSON)” button. Make sure that this entry has  python.exe at the end.  "python.pythonPath":
"C:\\Users\\<user_name>\\AppData\\Local\\Programs\\
Python\\Python38\\python.exe

or -

At first in the command palette (ctrl+shift+P) type python and look for “Python:Select Interpreter.” You will be prompted to enter the Python installation path.
If you are using a virtual environment, which is most of the time the case. Look for the path.venv/Script/python, or choose the python path where you installed it on your local system.


Thank you for reading the article. If you have any problem regarding this issue feel free to contact with us.