forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalitytriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Description
I'd like to connect to a python interpreter running inside of a docker container instead of my host machine.
Did some initial experiments by making a script:
exec docker exec python_service python $@And telling vscode that was my python interpreter. It failed at the first hurdle and by looking in the output I can see that this is due to the fact that the extension calls the python interpreter with file paths which of course don't exist in the container:
2023-06-21 19:34:43.194 [error] [Error: Command failed: /home/abrown/development/projects/dev-service/.vscode/dev-python -I /home/abrown/.vscode-server/extensions/ms-python.python-2023.10.1/pythonFiles/get_output_via_markers.py /home/abrown/.vscode-server/extensions/ms-python.python-2023.10.1/pythonFiles/interpreterInfo.py
python: can't open file '/home/abrown/.vscode-server/extensions/ms-python.python-2023.10.1/pythonFiles/get_output_via_markers.py': [Errno 2] No such file or directory
at ChildProcess.exithandler (node:child_process:400:12)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1093:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)] {
code: 2,
killed: false,
signal: null,
cmd: '/home/abrown/development/projects/dev-service/.vscode/dev-python -I /home/abrown/.vscode-server/extensions/ms-python.python-2023.10.1/pythonFiles/get_output_via_markers.py /home/abrown/.vscode-server/extensions/ms-python.python-2023.10.1/pythonFiles/interpreterInfo.py'
}
So I know it would be theoretically possible to pipe scripts into python instead of using those paths which would make it compatible with docker, but I understand that might be quite the undertaking. Am I totally out to lunch here? Or anyone have any other bright ideas?
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalitytriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team