Closed niderhoff closed 1 year ago
However, if a virtual environment in the shell is activated, it will try to run the debugpy library from the path ~/.virtualenvs/debugpy/site-packages/... with the python executable from the currently activated virtual env (which might be a completely incompatible version).
It assumes that you're using the same python version. The main idea behind this is that it avoids having to install debugpy
in every virtualenv you create.
I would assume another viable route is to install debugpy into my virtual env. But it wont let me setup dap-python without providing the path in .setup().
If you install debugpy in every projects virtualenv you can use 'python3'
or 'python'
as path. It honors $PATH
and virtualenv activation adds the virtual-env bin
folder to the start of $PATH
, so it will pick the right interpreter.
I have a question regarding how to setup this properly. I am assuming I don't understand the author's intention, so I am asking here how it is supposed to be setup.
The doc says this
Later it states that
If I set it up this way it is behaving quite strangely. I am assuming this last line will always run debugpy from the special "debugpy"-virtual environment using the python executable therein. This works, if no virtualenv is activated.
However, if a virtual environment in the shell is activated, it will try to run the debugpy library from the path
~/.virtualenvs/debugpy/site-packages/...
with the python executable from the currently activated virtual env (which might be a completely incompatible version).So if it detects the virtual env from the VIRTUAL_ENV variable, I would assume another viable route is to install debugpy into my virtual env. But it wont let me setup dap-python without providing the path in .setup().
So how is it supposed to work with virtual environments?