-
Notifications
You must be signed in to change notification settings - Fork 145
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
Add debugpy entry point #1639
Add debugpy entry point #1639
Conversation
@int19h - Hey Pavel, I tried to do some manual testing of this by running the internal debugpy build, but I'm seeing errors in the
These errors seem to be random. Note that we've moved up to the macos12 image on the vms (since macos11 is no longer supported). But the
But like it said, its sporadic, and seems environment dependent. I just don't know what causes it. 😄 edit: I guess since macos 11 is no longer supported by apple, I suppose I can just move the pool to |
Wheel tags on macOS are kind of a mess; see this for the gory details. So basically whether this shows up in tests or not depends on which version of the macOS SDK the Python binary was compiled on. The reason why this check is there and is treated as an error is so that whenever this happens and you end up getting a wheel for a higher version than what was requested (i.e. what the pool target is), it doesn't just get silently packaged and pushed to PyPI without updating setup.py, docs etc regarding minimum supported macOS version. AFAIK the only workaround to get working wheels for older versions of macOS is to use an older Python release (i.e. not the latest 3.8.x but say 3.8.0); I don't recall if that is something that can be easily done on the build machines, though. But, yes, given that VSCode itself doesn't support out-of-service macOS versions (https://code.visualstudio.com/docs/supporting/requirements), it's not worth the bother. |
Thanks for the details, appreciate it. 😀 |
@karthiknadig - Once this is merged in and a new debugpy version is released, here's how to achieve what you're trying to do:
|
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Fixes #1613
Testing
Scenario 1 - Package is installed in active environment
Windows
add_entry_point
branch instead of main.debugpy-1.8.2+12.g853cc05f-cp311-cp311-win_amd64.whl
from https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=9942339&view=artifacts&pathAsName=false&type=publishedArtifactspython -m pip install --no-index --find-links . debugpy
python -m debugpy -V
to verify that it installed correctly.debugpy -V
to verify that the entry point exists. The output was the same as the previous step, which proves the entry point works.debugpy --listen 5678 "C:\Users\advolker\OneDrive - Microsoft\Desktop\pythonTest\infiniteLoop.py"
and it ran correctly, which proves args are being passed along.Linux (WSL)
sudo apt install python3 python3-pip
python3 -m pip install --no-index --find-links . debugpy
export PATH=$PATH:/home/advolker/.local/bin
debugpy -V
and see that it worksdebugpy --listen 5678 ./infiniteLoop.py
and it worked.Scenario 2 - Package is installed in random directory
Windows
add_entry_point
branch instead of main.debugpy-1.8.2%2B15.gaaab9932-cp311-cp311-win_amd64.whl
from https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=9950165&view=artifacts&pathAsName=false&type=publishedArtifactspython -m pip install -t .\temp --no-index --find-links . debugpy
C:\Users\advolker\OneDrive - Microsoft\Desktop\temp\bin
toPATH
, like this:SET PATH=%PATH%;C:\Users\advolker\OneDrive - Microsoft\Desktop\temp\bin
C:\Users\advolker\OneDrive - Microsoft\Desktop\temp
toPYTHONPATH
, like this:SET PYTHONPATH=%PYTHONPATH%;C:\Users\advolker\OneDrive - Microsoft\Desktop\temp
debugpy -V
to verify that the entry point works.debugpy --listen 5678 "C:\Users\advolker\OneDrive - Microsoft\Desktop\pythonTest\infiniteLoop.py"
and it ran correctly.Linux (WSL)
sudo apt install python3 python3-pip
python3 -m pip install -t ./temp --no-index --find-links . debugpy
export PATH=$PATH:/home/advolker/temp/bin
export PYTHONPATH=$PYTHONPATH:/home/advolker/temp
debugpy -V
and see that it worksdebugpy --listen 5678 ./infiniteLoop.py
and it worked.