我收到一条提示:
Invalid Message: "pythonPath" is not valid if "python" is specified
Run Code Online (Sandbox Code Playgroud)
以及打开 launch.json 的选项。但我的 launch.json 不包含任何显示“pythonPath”的内容:
Invalid Message: "pythonPath" is not valid if "python" is specified
Run Code Online (Sandbox Code Playgroud)
这是我的tasks.json:
{
"configurations": [
{
"name": "Docker: Python - General",
"type": "docker",
"request": "launch",
"preLaunchTask": "docker-run: debug",
"python": {
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/app"
}
],
"projectType": "general"
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
和 Dockerfile:
# For more information, please refer to https://aka.ms/vscode-docker-python
FROM python:3.9.6-slim
# Keeps Python from generating .pyc files in …Run Code Online (Sandbox Code Playgroud)