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.
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.