Skip to content

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

Closed
@diego-gv

Description

@diego-gv

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

Activity

changed the title [-]Run and debug not running[/-] [+]Run and debug not running after update Python and Pylance extensions[/+] on Jul 8, 2022
davidbrownell

davidbrownell commented on Jul 8, 2022

@davidbrownell

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

karthiknadig commented on Jul 8, 2022

@karthiknadig
Member

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

int19h

int19h commented on Jul 8, 2022

@int19h

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

MatthewMarinets commented on Jul 8, 2022

@MatthewMarinets

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

louking commented on Jul 8, 2022

@louking

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

ziyoushibo commented on Jul 10, 2022

@ziyoushibo

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

tomer-grin commented on Jul 10, 2022

@tomer-grin

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

P4R

P4R commented on Jul 13, 2022

@P4R

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

Same issue. Solved with this ☝️

leondavi

leondavi commented on Jul 14, 2022

@leondavi

#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

karthiknadig commented on Jul 14, 2022

@karthiknadig
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

4 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

triage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @louking@int19h@karthiknadig@davidbrownell@P4R

      Issue actions

        Run and debug not running after update Python and Pylance extensions · Issue #19427 · microsoft/vscode-python