Skip to main content
Remove meta commentary; Add link to referenced answer;
Source Link
Gino Mempin
  • 28.3k
  • 30
  • 111
  • 156

I gave @mike-slinn a +1 because itMike Slinn's answer pointed me in the right direction but if you are a windowsWindows user of venv, this is exactly what I did. 

Open the launch.json and add the following:

 "python":"C:/Users/[pathto]/[projectfolder]/.venv/Scripts/python.exe"

Full File:

{
"version": "0.2.0",
"configurations": [
    {
        "name": "Python: Current File",
        "type": "python",
        "python": "C:/Users/cullen/pathto/projectfolder/.venv/Scripts/python.exe",
        "request": "launch",
        "program": "${file}",
        "console": "integratedTerminal",
        "justMyCode": true
    }
]}
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "python": "C:/Users/cullen/pathto/projectfolder/.venv/Scripts/python.exe",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "justMyCode": true
        }
    ]
}

I gave @mike-slinn a +1 because it pointed me in the right direction but if you are a windows user of venv, this is exactly what I did. Open the launch.json and add the following:

 "python":"C:/Users/[pathto]/[projectfolder]/.venv/Scripts/python.exe"

Full File:

{
"version": "0.2.0",
"configurations": [
    {
        "name": "Python: Current File",
        "type": "python",
        "python": "C:/Users/cullen/pathto/projectfolder/.venv/Scripts/python.exe",
        "request": "launch",
        "program": "${file}",
        "console": "integratedTerminal",
        "justMyCode": true
    }
]}

Mike Slinn's answer pointed me in the right direction but if you are a Windows user of venv, this is exactly what I did. 

Open the launch.json and add the following:

 "python":"C:/Users/[pathto]/[projectfolder]/.venv/Scripts/python.exe"

Full File:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "python": "C:/Users/cullen/pathto/projectfolder/.venv/Scripts/python.exe",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "justMyCode": true
        }
    ]
}
Source Link
Cullen D
  • 531
  • 5
  • 7

I gave @mike-slinn a +1 because it pointed me in the right direction but if you are a windows user of venv, this is exactly what I did. Open the launch.json and add the following:

 "python":"C:/Users/[pathto]/[projectfolder]/.venv/Scripts/python.exe"

Full File:

{
"version": "0.2.0",
"configurations": [
    {
        "name": "Python: Current File",
        "type": "python",
        "python": "C:/Users/cullen/pathto/projectfolder/.venv/Scripts/python.exe",
        "request": "launch",
        "program": "${file}",
        "console": "integratedTerminal",
        "justMyCode": true
    }
]}