question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Run and debug not running after update Python and Pylance extensions

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:8
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
tomer-grincommented, Jul 10, 2022

https://github.com/microsoft/vscode-python/issues/18453 Similar issue happened 6 months ago. I reverted to 2022.8.1 and it works for me.

1reaction
karthiknadigcommented, Jul 14, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code Debugger not working for python - Microsoft Q&A
When VS Code was updated to 1.64.0 it seems to have broken Python debugging. Clicking on "Run Python File" works fine. Clicking on...
Read more >
Language Server Extension Guide - Visual Studio Code
Explain how to run, debug, log, and test the Language Server extension. Point you to some advanced topics on Language Servers.
Read more >
VSCode Customization: Supercharge Your IDE - Vladimir Iashin
Since the August 2021 update VSCode supports this natively (RIP Bracket Pair ... Remote SSH allows you to edit, run, debug, type, test,...
Read more >
Debugging Python program doesn't work after updating to VS ...
You can try to reinstall the Python extension or install the older version of the Python extension. Delete the deprecated configuration ...
Read more >
Here's How to Make VSCode Faster
As a last-ditch effort, I would suggest trying out a fresh install of VS Code. It may or may not help, but what...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found