Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code Python debugger would not start with Python extension 2022.Xx.xx although latest 2021 (2021.12.1559732655) works. Starting regular run works

When starting a python script in debug mode from VS code nothing happens. I do not see any command being lunched in terminal. If I start the script without debugging it starts fine.

I read on another thread somewhere that choosing an older Python extension like 2021.12.1559732655 would fix it and indeed it does but I would like to use the latest version of Python extension.

Anyone has any idea what broke in the new extensions starting with 2022.. basically anything with 2022 will not do anything when attempting to start the script in debug.

I am running remotely from a windows using ssh on a centos7 with python 2.7 and python 3.6. Not sure if that matters.

I tried starting python scripts from Visual Studio code in debug mode VS code does not do anything.

Tried modifying the config , restart , switching back to python 2.7 without result..

The only thing that works is reverting to a version pre 2022

like image 939
nuxu Avatar asked Nov 02 '25 07:11

nuxu


1 Answers

Seems that I got my answer on ghithub. The debugger will not work with versions lower than Python 3.7.

For anything other than Python 3.7+ (like Python 2.6 ) use the 2021.12 version of the vs code python extension.

https://github.com/microsoft/vscode-python/issues/19559#issuecomment-1358494296

like image 119
nuxu Avatar answered Nov 05 '25 00:11

nuxu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!