-
Notifications
You must be signed in to change notification settings - Fork 182
add debugpy-adapter entrypoint #1870
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
Conversation
|
@microsoft-github-policy-service agree |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Once this goes through we should probably update the wiki page to explain how it can be started: |
|
I don't think the failed ci runs are related to my changes? |
|
Yeah I agree. I'll submit. |
|
Can you update the wiki with this extra supported command line? |
|
I don't think I have the permissions to edit the wiki? And should the |
|
I updated all of the command line references to say You added support for calling the adapter directly, right? With the full path? |
|
No, this doesn't solve the venv-usage yet, I fear, but is a step towards it. What the launcher now allows is launching despite being in a venv (where debugpy isn't installed). What remains to be done is that debugpy now is aware of the venv, I think. One idea would be adding the venv site package path to the path, and removing system site packages if the venv config disallows system-site-packages. What do you think? |
|
Sorry but I'm confused. I thought you were doing the opposite. Debugpy can already be run outside of a venv. It's actually how VS code itself works. |
|
Yes, that's what I'm trying to achieve, but using the adapter. How is debugpy launched in vscode so this works properly? |
|
The command line looks like so: Where
That launcher package accomplishes what you're trying to do I believe. |
) ## Description Uses a less hacky and now officially-supported way of getting the debugpy DAP adapter path for nvim-dap-python. Since mfussenegger/nvim-dap-python#184, nvim-dap-python can start the debugpy adapter using the `debugpy-adapter` executable. Since [Mason](https://github.com/mason-org/mason-registry/blob/f7c1c2fde2d1c79f8892dafc9528da1b78b56b25/packages/debugpy/package.yaml#L17) and [now debugpy itself](microsoft/debugpy#1870) provide this executable, there's no need to get the `python` executable from debugpy's venv. I've gone with just `"debugpy-adapter"` rather than `LazyVim.get_pkg_path("debugpy", "debugpy-adapter")` so that a system-wide installation of debugpy can also be used. ## Related Issue(s) <!-- If this PR fixes any issues, please link to the issue here. - Fixes #<issue_number> --> ## Screenshots <!-- Add screenshots of the changes if applicable. --> ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
…080) ## Description Uses a less hacky and now officially-supported way of getting the debugpy DAP adapter path for nvim-dap-python. Since mfussenegger/nvim-dap-python#184, nvim-dap-python can start the debugpy adapter using the `debugpy-adapter` executable. Since [Mason](https://github.com/mason-org/mason-registry/blob/f7c1c2fde2d1c79f8892dafc9528da1b78b56b25/packages/debugpy/package.yaml#L17) and [now debugpy itself](microsoft/debugpy#1870) provide this executable, there's no need to get the `python` executable from debugpy's venv. I've gone with just `"debugpy-adapter"` rather than `LazyVim.get_pkg_path("debugpy", "debugpy-adapter")` so that a system-wide installation of debugpy can also be used. ## Related Issue(s) <!-- If this PR fixes any issues, please link to the issue here. - Fixes #<issue_number> --> ## Screenshots <!-- Add screenshots of the changes if applicable. --> ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
so the adapter can also be launched inside a venv even though debugpy is not installed in the venv.
ref #1868