You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(1)Disable Python Debugger plugin (works in python environment):
(2)Enable Python Debugger plugin (python does not work):
( Disable or enable the plugin and restart Vscode to test )
This plugin seems to block or affect, destroy the activation of the conda python environment in vscode~
The above picture is enough to prove the problem! Please check BUG ~ Thanks ~
I'm getting this same issue on my VSCode on MacOS. Python virtual environment seems to be active but when running which python it returns python not found.
Doing the same as this user yields results, and the environment works as expected again.
By observing the PATH path of this python-debugger plugin, it is obvious that it mistakenly overwrites the original Conda PATH, and the appended path is obviously wrong.
ms-python.debugpy:
PATH= is missing here! ${env:PATH};
You can see that the PATH concatenation of ms-python.debugpy discards the paths such as ms-python.python conda environment, causing Python to fail to execute correctly!
The python-debugger plugin rudely discards the activated python environment PATH variable and only uses the ${env:PATH}; part.
José Antunes (@theholy7) Try adding this to your User settings.json and reload:
Now, you can switch Python environments freely and conda activation works normally.
Activity
theholy7 commentedon Jul 17, 2025
I'm getting this same issue on my VSCode on MacOS. Python virtual environment seems to be active but when running which python it returns python not found.
Doing the same as this user yields results, and the environment works as expected again.
juntaosun commentedon Jul 17, 2025
By observing the PATH path of this python-debugger plugin, it is obvious that it mistakenly overwrites the original Conda PATH, and the appended path is obviously wrong.
You can see that the PATH concatenation of ms-python.debugpy discards the paths such as ms-python.python conda environment, causing Python to fail to execute correctly!
The python-debugger plugin rudely discards the activated python environment PATH variable and only uses the ${env:PATH}; part.
theholy7 commentedon Jul 17, 2025
Is it #748 that broke it?
juntaosun commentedon Jul 17, 2025
I'm not sure what happened before, but the latest version shows that there is a serious BUG in the environmental contribution.
juntaosun commentedon Jul 17, 2025
José Antunes (@theholy7) Try adding this to your User settings.json and reload:
Now, you can switch Python environments freely and conda activation works normally.
尝试将以下内容添加到您的用户 settings.json 并重新加载:
现在,可以自由切换 python 环境,conda 激活正常。
settings.json:
theholy7 commentedon Jul 17, 2025
For now I just turned off the debugger. I don't use it. Thank you for the tips though :)