Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.7 debugger does not launch (but Python 2.7 works) #82403

Closed
jdwestwood opened this issue Oct 12, 2019 · 2 comments
Closed

Python 3.7 debugger does not launch (but Python 2.7 works) #82403

jdwestwood opened this issue Oct 12, 2019 · 2 comments
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@jdwestwood
Copy link

VSCode version 1.39.1
Python 2019.10.41019
Windows 10 Home with Python 3.7.1 and 2.7.15 installed

Steps to reproduce:
Create a workspace folder with:

  1. settings.json:
{
    // Python 3.7.1
    "python.pythonPath": "C:\\Python37\\python.exe"
}
  1. launch.json:
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
        },
    ]
}
  1. test.py:
hello = "Hello"
print(hello)

Debug test.py using Python: Current File.

Expected result:
Program runs in the integrated terminal and prints "Hello".

Actual result:
Program does not run.

"Python" terminal output (pylint output removed):

User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'ShowExtensionSurveyPrompt - control'
User belongs to experiment group 'DebugAdapterFactory - experiment'
User belongs to experiment group 'PtvsdWheels37 - experiment'
Starting Microsoft Python language server.
> conda --version
> pyenv root
> python3.7 -c "import sys;print(sys.executable)"
> python3.6 -c "import sys;print(sys.executable)"
> python3 -c "import sys;print(sys.executable)"
> python2 -c "import sys;print(sys.executable)"
> python -c "import sys;print(sys.executable)"
> py -3.7 -c "import sys;print(sys.executable)"
> py -3 -c "import sys;print(sys.executable)"
> py -2 -c "import sys;print(sys.executable)"
> py -3.6 -c "import sys;print(sys.executable)"
> C:\Python37\python.exe -c "import sys;print(sys.executable)"
> conda info --json
> ~\AppData\Local\Microsoft\WindowsApps\python.exe c:\Users\John\.vscode\extensions\ms-python.python-2019.10.41019\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Microsoft\WindowsApps\python.exe c:\Users\John\.vscode\extensions\ms-python.python-2019.10.41019\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Microsoft\WindowsApps\python3.exe c:\Users\John\.vscode\extensions\ms-python.python-2019.10.41019\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Microsoft\WindowsApps\python3.exe c:\Users\John\.vscode\extensions\ms-python.python-2019.10.41019\pythonFiles\interpreterInfo.py

> C:\Python37\python.exe c:\Users\John\.vscode\extensions\ms-python.python-2019.10.41019\pythonFiles\ptvsd_folder_name.py
> C:\Python37\python.exe c:\Users\John\.vscode\extensions\ms-python.python-2019.10.41019\pythonFiles\ptvsd_folder_name.py

Additional info:
When the Python 2.7.15 interpreter is specified for python.pythonPath, everything works as expected: test.py runs and breakpoints are hit.

@olegpts
Copy link

olegpts commented Oct 12, 2019

here is the solution/wa
microsoft/vscode-python#7836

"For anyone looking, the workaround is to add requirements.txt file with this content:

jedi==0.15.1
parso==0.5.1
isort==4.3.21
ptvsd==5.0.0a5
pyparsing==2.4.0
six==1.12.0
packaging==19.2

to this location on windows:
%USERPROFILE%/.vscode\extensions\ms-python.python-2019.10.41019\

or this location on Linux/Mac:
$HOME/.vscode/extensions/ms-python.python-2019.10.41019/
"

@jrieken jrieken added the *caused-by-extension Issue identified to be caused by an extension label Oct 14, 2019
@vscodebot
Copy link

vscodebot bot commented Oct 14, 2019

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Oct 14, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

3 participants