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
Configuring "console": "internalConsole" for a launch target causes Python subprocesses spawned by the main debug process to not have their venv inherited correctly.
Dialog box with "Server disconnected unexpectedly" displayed
"No module named cowsay" printed in debug console
Expected outcome
Subprocess runs without error
Notes
The underlying cause seems to be that the PATH and VIRTUAL_ENV env vars are not inherited correctly in spawned subprocesses when they are intercepted for debugging.
The text was updated successfully, but these errors were encountered:
Internal Console vs Integrated Terminal is handled in the debug server, so moving this to debugpy.
I also noticed that you are using "python" instead of sys.executable. If I remember correctly that results in a shell execution, so it might not run with the same environment variables.
Configuring
"console": "internalConsole"
for a launch target causes Python subprocesses spawned by the main debug process to not have their venv inherited correctly.Repro. steps:
cowsay
test.py
:.vscode/launch.json
:Actual outcome
Expected outcome
Notes
The underlying cause seems to be that the
PATH
andVIRTUAL_ENV
env vars are not inherited correctly in spawned subprocesses when they are intercepted for debugging.The text was updated successfully, but these errors were encountered: