VSCODE未正确调试枪支
因此,经过大量的搜索,我找到了一种使Gunicorn使用以下启动使用VSCODE播放的方法。JSON
"version": "0.2.0",
"configurations": [
{
"name": "Python: Run Debug",
"cwd": "${workspaceFolder}/dir/dir2",
"type": "python",
"request": "launch",
"program": "/Users/me/.virtualenvs/dir/bin/gunicorn",
"args": ["--bind 0.0.0.0:6543", "-w=1", "--paste=local.ini" ],
"console": "integratedTerminal",
"justMyCode": false,
"purpose": ["debug-in-terminal"],
"gevent": true,
"env": {
"GEVENT_SUPPORT": "True",
"PYTHONUNBUFFERED":"1",
"OBJC_DISABLE_INITIALIZE_FORK_SAFETY":"YES",
"PYDEVD_LOAD_NATIVE_LIB": "0",
"PYDEVD_USE_CYTHON":"0"
}
}
]
}
现在使服务器运行,但它不会输出变量,它不会在任何断点上停止,我看不到任何内容。基本上,整个左窗格都是完全空的。
以前有人成功处理过这个问题吗?
So after much searching I found a way to get gunicorn to play nice with vscode using the following launch.json
"version": "0.2.0",
"configurations": [
{
"name": "Python: Run Debug",
"cwd": "${workspaceFolder}/dir/dir2",
"type": "python",
"request": "launch",
"program": "/Users/me/.virtualenvs/dir/bin/gunicorn",
"args": ["--bind 0.0.0.0:6543", "-w=1", "--paste=local.ini" ],
"console": "integratedTerminal",
"justMyCode": false,
"purpose": ["debug-in-terminal"],
"gevent": true,
"env": {
"GEVENT_SUPPORT": "True",
"PYTHONUNBUFFERED":"1",
"OBJC_DISABLE_INITIALIZE_FORK_SAFETY":"YES",
"PYDEVD_LOAD_NATIVE_LIB": "0",
"PYDEVD_USE_CYTHON":"0"
}
}
]
}
Now this makes the server run but it outputs no variables, it doesn't stop at any breakpoints, and I can't watch anything. Basically, the whole left pane is completely empty.
Has anyone dealt with this successfully before?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论