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

Run and debug not running after update Python and Pylance extensions #19427

Closed
diego-gv opened this issue Jul 8, 2022 · 11 comments
Closed

Run and debug not running after update Python and Pylance extensions #19427

diego-gv opened this issue Jul 8, 2022 · 11 comments
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@diego-gv
Copy link

diego-gv commented Jul 8, 2022

Behaviour

Expected vs. Actual

Today the Pylance and Python extensions have been updated to versions 2022.7.20 and 2022.10.0 respectively, and my setup for running and debugging my code has stopped working.

If I go back to the previous versions 2022.06.30 and 2022.8.1 everything works correctly again.

I have tried different combinations and using Jedi instead of Pylance, and it seems that the error is in version 2022.10.0 of the Python extension.

Steps to reproduce:

  1. VSCode Latest version
  2. Install versions 2022.7.20 and 2022.10.0 of Pylance and Python respectively
  3. Run launch.json configuration

Diagnostic data

  • Python version: 3.6
  • Type of virtual environment used: devcontainer
  • Value of the python.languageServer setting: Pylance
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

El experimento \"pythonaacf\" está activo
El experimento \"pythonTensorboardExperiment\" está activo
El experimento \"PythonPyTorchProfiler\" está activo
LSP Notebooks experiment is disabled -- not in treatment group
Ruta de acceso del intérprete de Python: /usr/local/bin/python
Iniciando el servidor de lenguaje Pylance.
DAP Server launched with command: /usr/local/bin/python /root/.vscode-server/extensions/ms-python.python-2022.10.0/pythonFiles/lib/python/debugpy/adapter

User Settings


languageServer: "Pylance"

linting
• flake8Args: "<placeholder>"
• flake8Enabled: true
• flake8Path: "<placeholder>"
• banditPath: "<placeholder>"
• mypyPath: "<placeholder>"
• pycodestyleArgs: "<placeholder>"
• pycodestyleEnabled: true
• pycodestylePath: "<placeholder>"
• pydocstylePath: "<placeholder>"
• pylintArgs: "<placeholder>"
• pylintPath: "<placeholder>"

formatting
• autopep8Path: "<placeholder>"
• blackPath: "<placeholder>"
• yapfPath: "<placeholder>"

testing
• pytestPath: "<placeholder>"
• unittestArgs: "<placeholder>"
• unittestEnabled: true

terminal
• activateEnvironment: false

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jul 8, 2022
@diego-gv diego-gv changed the title Run and debug not running Run and debug not running after update Python and Pylance extensions Jul 8, 2022
@davidbrownell
Copy link

I am experiencing the same problem. In my case, things seem to fail quickly as I don't see much in the python output:

DAP Server launched with command: <removed>\Generated\Windows\DefaultEnv\DefaultConfig\Python\python.exe c:\Users\david\.vscode\extensions\ms-python.python-2022.10.0\pythonFiles\lib\python\debugpy\adapter

@karthiknadig
Copy link
Member

The debug adapter was updated in the latest release to debupy=1.6.2. Adding @int19h for investigation.

@int19h
Copy link

int19h commented Jul 8, 2022

Python 3.6 is not supported for debugging. This has been true since debugpy 1.6.0, but depending on the code path taken, it might not hit any code that actually used Python 3.7+ features. Since 1.6.1, however, there's an explicit check on import to make it clearer what's going on:

https://github.com/microsoft/debugpy/blob/5da7721d4dd62b3016bfea062612184f7a875278/src/debugpy/__init__.py#L27-L30

I was assuming that any such stderr output from the debug adapter would be displayed by the client. But if not, I guess there needs to be yet another check on VSCode side.

@MatthewMarinets
Copy link

Just got this same issue today, got terribly confused because I was switching between two different Python interpreters (3.10 and 3.6) and the 3.6 one just wouldn't start.

The big issue here seems to be the lack of feedback -- the integrated terminal would open and then there would just be no response, no error message or even a printout of a command-line.

@louking
Copy link

louking commented Jul 8, 2022

me, too -- I'm also using python 3.6.8 -- I need to upgrade one app at a time

FWIW, the Python extension prerelease v2022.11.11891004 seems to work

@ziyoushibo
Copy link

Behaviour

Expected vs. Actual

Today the Pylance and Python extensions have been updated to versions 2022.7.20 and 2022.10.0 respectively, and my setup for running and debugging my code has stopped working.

If I go back to the previous versions 2022.06.30 and 2022.8.1 everything works correctly again.

I have tried different combinations and using Jedi instead of Pylance, and it seems that the error is in version 2022.10.0 of the Python extension.

Steps to reproduce:

  1. VSCode Latest version
  2. Install versions 2022.7.20 and 2022.10.0 of Pylance and Python respectively
  3. Run launch.json configuration

Diagnostic data

  • Python version: 3.6
  • Type of virtual environment used: devcontainer
  • Value of the python.languageServer setting: Pylance

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)
User Settings

me too +10086

@tomer-grin
Copy link

tomer-grin commented Jul 10, 2022

#18453
Similar issue happened 6 months ago.
I reverted to 2022.8.1 and it works for me.

@P4R
Copy link

P4R commented Jul 13, 2022

#18453 Similar issue happened 6 months ago. I reverted to 2022.8.1 and it works for me.

Same issue. Solved with this ☝️

@leondavi
Copy link

leondavi commented Jul 14, 2022

#18453 Similar issue happened 6 months ago. I reverted to 2022.8.1 and it works for me.

Solved the issue on both Centos 7 and Windows 10

@karthiknadig
Copy link
Member

Python 3.6 is not supported for debugging, since Python 3.6 has been out of service for about 6 months. Please pin the extension to version 2022.8.* is you need to work with python 3.6

@davidbrownell
Copy link

Thanks for the info, @karthiknadig. Is there an action item to improve the diagnostic information should something like this happen again in the future?

Looks like this is something that has happened before and folks have commented in the various threads that they have spent multiple hours trying to figure out what might be happening when things seem to silently fail.

I know that some sort of message would have saved me an hour or so this time around.

Thanks much!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

10 participants