Running VSCode debugpy for pytest remotely on an AWS Sagemaker instance. launch.json times out owing to Permission denied error on $CONDA_PREFIX directory. I have manually set chmod -R 777 $CONDA_PREFIX but still get Permission denied.
Note that this has never been a problem before with my setup, it just started today.
Environment data
- debugpy version: 1.8.15
- OS and version: Ubuntu 22.04
- Python version (& distribution if applicable, e.g. Anaconda):
conda-forge 3.12.11
- Using VS Code or Visual Studio: VS Code
Actual behavior
Upon attempting to launch test debugging from the Testing pane:
cd /home/sagemaker-user/user-default-efs/$CODE_DIR ; /usr/bin/env $CONDA_PREFIX /home/sagemaker-user/.vscode-server/extensions/ms-python.debugpy-2025.10.0/bundled/libs/debugpy/adapter/../../debugpy/launcher 57595 -- /home/sagemaker-user/.vscode-server/extensions/ms-python.python-2025.10.1/python_files/vscode_pytest/run_pytest_script.py --rootdir=/home/sagemaker-user/user-default-efs/$CODE_DIR --capture=no
/usr/bin/env: '$CONDA_PREFIX': Permission denied
and a popup with Timed out waiting for launcher to connect which is presumably the consequence of the above error.
Expected behavior
Launch debugpy.
Steps to reproduce:
launch.json:
"version": "0.2.0",
"configurations": [
{
"name": "Python: Debug Tests",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"purpose": ["debug-test"],
"console": "externalTerminal",
"justMyCode": false,
"args": [
"--cache-clear"
],
}
}
]
}
2. `chmod +R 777 $CONDA_PREFIX`
3. launch any test from `Debug test` icon in `Testing` pane
Running VSCode debugpy for pytest remotely on an AWS Sagemaker instance.
launch.jsontimes out owing toPermission deniederror on$CONDA_PREFIXdirectory. I have manually setchmod -R 777 $CONDA_PREFIXbut still getPermission denied.Note that this has never been a problem before with my setup, it just started today.
Environment data
conda-forge3.12.11Actual behavior
Upon attempting to launch test debugging from the Testing pane:
and a popup with
Timed out waiting for launcher to connectwhich is presumably the consequence of the above error.Expected behavior
Launch debugpy.
Steps to reproduce:
launch.json: