-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Bring back Python 3.6 debugging support by breaking debugging out into its own extension #19559
Comments
Is this only for debugging support? Or can Intellisense also be included? I work for a company that uses Red Hat 7 which does support 3.6 as part of the distribution. |
This is only explicitly for debugging as IntelliSense shouldn't be affected by any of this as Pylance is written in TypeScript. If you're using Jedi then that is up to the Jedi project itself in terms of what versions they support. |
I am feeling that this answers my question on why my debugger does not start: https://stackoverflow.com/questions/74812777/vs-code-python-debugger-would-not-start-with-python-extension-2022-xx-xx-althoug?noredirect=1#comment132043707_74812777 |
Python 3.7. |
v2022.6.3 working fine |
Is there any ETA? I'm regularly hit by the update / new install then later wonder why something doesn't work on a remote... ... and wouldn't this issue be still the same, so Python 2.7 still won't work (last time it did was v2022.2.x, I think)?
|
@GitMensch no promises, but we are hoping for a preview release in May. And Python 2.7 is in the same situation as 3.6, so we would have to see if the last debugpy release would work with the extension and then make that the initial release, do an immediate new release for one that uses the newest version that supports back to Python 3.6, and then do yet another immediate release that uses the newest version of debugpy regardless of Python version support. But once again, no promises on whether we will be able to get support for Python 2.7 out. |
@brettcannon Hello! Maybe it's better to decide |
That looks nice, but I'm not sure if the python36 path is "general setup" that will be found in all environments. |
It seems like there are at least 3 kinds of python paths:
And the adapter, launcher, debugee all use the same In order to keep debugpy version matching python version, debugpy path and python path should be set in ts code. |
Here is a solution writing in ts to choose debugpy version according to python version. If python version is less than 3.7, the debugpy adapter package path is set to "pythonFiles/lib/python36/debugpy/adapter", where the debugpy 1.51 is. In order to keep debugpy version matching python version, if config "debugAdapterPython" is undefined, config "python" will be set in preference to the lagacy config "pythonPath". |
When could we have the nice feature? The VS is not supported for setting fixed extension version for the workspace. And it is realy unconvenient. |
Thanks for your work! When I am trying to debug inside my docker container (with dev container extension), I am still prompted that python version lower than 3.7 is not supported. Am I missing some steps? I tried to hit the debug button, or use "Debugpy: Debug Python File" in command palette, the behaviors are the same The versions installed inside my dev container: |
@XuShenLZ Are you using the Python Debugger extension or the Python extension itself? And are you using the appropriate version of the Python Debugger extension? |
@brettcannon I have both Python Debugger extension or the Python extension installed. And the versions of them are listed above
It seems that when I hit the "debug" button or "Debugpy: Debug Python File" in the command palette, it still tries to use the Python extension to do that. How should I set it to use Debugpy Extension? |
Thanks for your reply @XuShenLZ, the version 2023.3.* does not support python versions lower than 3.7. Could you try again with the version v2023.1.12492010?(Make sure that this version is installed in the container) |
Thanks @paulacamargo25 . I tested again with version I have brought this up in an issue in the Python Extension repo. |
Hi, I indeed successfully could debug Python 2.7 code, locally. However, when I go for the attach 'request' in my launch.json, I can not get the breakpoint in my code to hit (i'm using debugpy 1.5.1 on my remote system): "configurations": [
On my remote system I start up a SSH tunnel: ssh -2 -L 5678:localhost:5678 my_remote_host And I start debugby (1.5.1) on the remote system like: python -m debugpy --listen 5678 --wait-for-client /usr/home/testfolder/mytest_python27.py When I run the launch configuration on mytest_python27.py, the remote python script gets executed but breakpoints are not being hit locally. Is attaching to a remote debugpy 1.5.1 supported? |
It should when both sides are running the same version of debugpy, but @paulacamargo25 should be able to give a more definitive answer. |
From debugpy perspective, it depends on direction of connection, too. If you're using OTOH if you are using Since the scenario described above is the first one, it's more likely that breakpoints not being hit are due to some issues with path mapping, or possibly because the folder is misinterpreted as library code (if so, |
Oh no. This kit need to support python2 also |
Correct.
Also correct.
That's sort of correct, sort of not. You're right that version isn't listed, but it's still available. You can follow the instructions at #20184 but for the debugger extension to directly download older versions. But you can select specific versions from the extension sidebar as well and that will list all versions available. |
Thanks! Got it working. For anyone else dropping by here after a web-search, here are the complete set of steps to debug Python code <=3.7 on Visual Studio Code:
The other alternative is to junk this and use PyCharm (which apparently works seamlessly for all Python versions), but where's the fun in doing that. :) |
This shouldn't be necessary after the next release of VS Code which should be out roughly 2024-02-01.
Admittedly we could as well (we use the same base debugger and we actually used to fund it's development), but it's a download size trade-off: little over 100 MB or over 500 MB? And this also affects downloading updates to the extension. And w/ the vast majority of our users not needing to download an older version of debugpy, we decided on the smaller, faster, less wasteful approach. |
vS code 1.87 not allowed to use old version of debugger. |
Can you be more specific? Extensions can set a minimum VS Code version, but not a maximum. |
这是来自QQ邮箱的自动回复邮件。 您好,你的邮件我已经收到。
|
Unfortunately I can't read that. |
There was a bug in the marketplace. Please try again. |
Hello! ?9?9Thanks for your
|
still only v2024 available, got any info on this behaviour ? |
You can follow the steps here in order to install a pre-release version of the extension. |
A detail that I'm not sure is obvious is you need to opt into the pre-release version of the extension as the older versions of the extension w/ older debugpy releases were released as pre-release. As soon as you switch you will see all of the versions: (Notice how I filtered the versions to only "2023.1" and you can sort of make out behind the drop-down it says "Switch to Release Version", showing I'm using a pre-release version.) |
I have opened microsoft/vscode-python-debugger#212 to help make this more clear. |
I'll close this issue since the Python Debugger is already in production, feel free to submit a feature-request pr bug report in the Python Debugger Extension Repository. |
Hello! ?9?9Thanks for your
|
By making debugging a separate extension we can do an initial release using debugpy 1.5 which will work all the way back to Python 2.7, and then immediately do another release using debugpy 1.6. That way people who need debugging support for older Python versions can pin the debugging extension version but leave the Python extension alone to get newer feature support (if it works with the old version of Python that they are running).
The text was updated successfully, but these errors were encountered: