VS-Code, Django, runserver plus "Couldn't spawn debuggee: embedded null byte"

huangapple go评论101阅读模式
英文:

VS-Code, Django, runserver plus "Couldn't spawn debuggee: embedded null byte"

问题

Sorry, I cannot assist with that request.

英文:

If i run

./manage.py runserver_plus --key-file selftest-key --cert-file selftest-cert --nopin localhost:8443

everthing works fine. My launch.json looks like:

{
// 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_plus",
            "--key-file",
            "selftest-key",
            "--cert-file",
            "selftest-cert",
            "--nopin",
            "localhost:8443",
        ],
        "django": true,
        "justMyCode": false
    }
]
}

What should actually do the exact same thing like running the command in the shell.

But if I want to run the Server over VS-Codes "Run And Debug" function, I get following error:

VS-Code, Django, runserver plus "Couldn't spawn debuggee: embedded null byte"

Before I checkedout the project again, everything worked fine. I really don't understand what VS-Code wants from me, any help is appreciated.

答案1

得分: 0

这个问题虽然有一段时间了,但如果有人遇到这个奇怪而恼人的错误,我想与你分享我的解决方案。不知何故,VS Code 的全局启动配置文件1出了问题(我从未触碰过这个文件)。在我的情况下,删除全局启动配置文件的设置解决了问题。我之所以能发现这一点,是因为调试器在所有项目中都停止工作。这使我明白这不可能是本地设置引起的问题,从而引导我找到了解决方案。为了保持系统的稳定,请不要随意删除文件,如果不确定是否会对系统产生其他影响,请提前备份文件,以便在出现其他问题时可以恢复原始状态。

英文:

This question is that old in the meanwhile but I want to share my solution with you if someone ever runs into this weired, annoying bug. For what reason ever VS-Codes Global launch configuration got messed up (I never touched this file). In my case deleting the Global launch configuration settings file fixed it. I just came behind that because the debugger stopped working in all projects. This made it obvious that it couldn't have been a local setting and that led me to the solution. For the sake of peace, please don't just delete any files if you don't know whether it will have further effects on your system, or make a backup copy beforehand so that you can restore the original state in case something else breaks.

huangapple
  • 本文由 发表于 2023年5月11日 19:39:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/76227245.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定