close

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

Hello Guys, How are you all? Hope You all Are Fine. Today When I run my python code Suddenly I got VSCode: The Python path in your debug configuration is invalid in Python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How VSCode: The Python path in your debug configuration is invalid Error Occurs ?

I am trying to debug a simple python program via “F5” or “Run with debugger”. Whenever I press F5 using the python extension, a pop-up appears at the bottom right “The Python path in your debug configuration is invalid.”

How To Solve VSCode: The Python path in your debug configuration is invalid Error ?

  1. How To Solve VSCode: The Python path in your debug configuration is invalid Error ?

    To Solve VSCode: The Python path in your debug configuration is invalid just Open Command Palette (Ctrl + Shift + P). Type Python: Select Interpreter, open it Select the python interpreter or enter the full path to the python interpreter. 

Solution 1: add Python:Select Interpreter

Vscode is not able to find the python path or its not yet set.

Open command palette(ctrl+shift+P) and type python and look for “Python:Select Interpreter”. You will be asked to enter the path of python where it is installed.

Incase you are using virtual environment and in most of the case its true. Look for the path .venv/Script/python else select the python path where you have installed in your local machine.

Solution 2: 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\\<your_user_name>\\AppData\\Local\\Programs\\Python\\Python38\\python.exe

Solution 3: add pythonPath

You could try something like this but directing it to wherever your python program is install on your system

{
    "python.pythonPath": "C:\\Python36\\python.exe"
}

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also Read

Please Rate Our Solution to Motivate Us For Give Our Best

Leave a Comment