Skip to content

Conversation

@sbivol
Copy link

@sbivol sbivol commented Aug 23, 2025

Fixes #936

There must be a python2 interpreter available, which is the case on Linux when Python 2 is installed.

On Windows, one needs to link (or move) python.exe to python2.exe, otherwise it's not possible to distinguish between Python 2 and Python 3 when both are on %PATH%:

cd C:\Python27\
mklink /H python2.exe python.exe

Now the gadget can be installed successfully.

@puremourning
Copy link
Owner

This change is Reviewable

@sbivol sbivol force-pushed the fix-gadget-python2 branch from 051142d to 6bc9207 Compare August 24, 2025 22:14
@puremourning
Copy link
Owner

I'm not sure about this. I get that it's broken and that's annoying, but at the same time, having to create a python2 symlink to make it work is just as broken.

My temptation at this point actually is to just remove this python2 support from the main vimspector and write a wiki page that says how to set it up manually. Python2 has been deprecated for so long now, I don't really feel like supporting it any longer directly.

@sbivol
Copy link
Author

sbivol commented Aug 26, 2025

Thanks for looking into this.

Linking is only required on Windows, since all interpreters get the python.exe name there, irrespective of version.
On Linux there's no such issue, and I expect the same to be true on MacOS.

Vimspector support for Python 2 is valuable to me since it helps with porting abandoned software.

Should you decide to keep this functionality, I volunteer to test debugpy-python2 and fix any issues that may arise with it in the future.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installing the debugpy-python2 gadget fails

2 participants