3

I tried to debug python code on visual studio code (version 1.15) but it says that i should setup python path

so can someone help out ?

Garde Des Ombres
  • 173
  • 1
  • 3
  • 12

2 Answers2

0

If you're on Windows the best thing to do is reinstall Python and during the installation there is an option to add python to your path. You will also need to restart Visual Studio Code. In addition, you need to install the Python extension by Don Jayamayne (most likely) to actually be able to run and step through your Python Code.

Follow these instructions to add Python to your path manually if you don't want to reinstall. How to add to the pythonpath in windows 7?

Chris Hawkes
  • 11,923
  • 6
  • 58
  • 68
0

If you're in 'Visual Studio Code', in File Explorer (left hand column), you see a file 'settings.json'. Click on it, and when it opens in the editor, add the path to your Python executable, like this (but with your own path):

// Place your settings in this file to overwrite default and user settings.
{
    "python.pythonPath": "c:/python27amd64/python.exe"
}

Save it and try it.

See also: https://github.com/DonJayamanne/pythonVSCode/wiki/Python-Path-and-Version

Hope this helps.