VS代码远程容器不会在断点处停止

Vs code remote container not stopping on breakpoints

我有一个 devcontainer.json 和 launch.json 的设置,以及 vs-code 中的新 Remote Container 插件。但我无法让断点工作。我启动了应用程序并可以浏览它,但断点未命中,我是否在 launch.json 中遗漏了什么?

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Django",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/manage.py",
            "args": [
                "runserver",
                "0.0.0.0:8000",
            ],
            "env": {
                "PYTHONUNBUFFERED": 1,
                "ENV": "local",
                "DJANGO_SITE_ID": 1,
                "DJANGO_SETTINGS_MODULE": "project.settings.local1",
            }
        }
    ]
}

您的配置与 Django 的默认 launch.json 配置不同,并且缺少一些关键部分(看起来缺少的一切都很重要):

    {
        "name": "Python: Django",
        "type": "python",
        "request": "launch",
        "program": "${workspaceFolder}/manage.py",
        "console": "integratedTerminal",
        "args": [
            "runserver",
            "--noreload",
            "--nothreading"
        ],
        "django": true
},