简体   繁体   English

vs代码远程容器未在断点处停止

[英]Vs code remote container not stopping on breakpoints

I have a setup with both a devcontainer.json and a launch.json with the new Remote Container plugin in vs-code. 我有一个带有devcontainer.json和launch.json的安装程序,并且在vs-code中有新的Remote Container插件。 But I cant get the breakpoints working. 但是我无法使断点正常工作。 I get the app to launch and can browse it, but the breakpoints are not getting hit, am I missing something in my launch.json? 我启动了应用程序并可以浏览它,但是断点没有命中,我的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",
            }
        }
    ]
}

Your configuration has diverged from the default launch.json config for Django and is missing some critical parts (it looks like everything that's missing is important): 您的配置与Django的默认launch.json配置不同,并且缺少了一些关键部分(看起来丢失的所有内容都很重要):

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM