Python 3.x 在VS代码中设置UWSGI调试
我正在尝试用VS代码调试本地uwsgi。很遗憾,我无法将python解释器附加到我的可视化代码调试: VSCode launch.json配置:Python 3.x 在VS代码中设置UWSGI调试,python-3.x,visual-studio-code,uwsgi,vscode-debugger,Python 3.x,Visual Studio Code,Uwsgi,Vscode Debugger,我正在尝试用VS代码调试本地uwsgi。很遗憾,我无法将python解释器附加到我的可视化代码调试: VSCode launch.json配置: { "type": "python", "request": "attach", "name": "Launch uWSGI", "port": 9090, "host": "127.0.0.1", "pathMappings": [
{
"type": "python",
"request": "attach",
"name": "Launch uWSGI",
"port": 9090,
"host": "127.0.0.1",
"pathMappings": [
{
"localRoot": "${workspaceFolder}", // You may also manually specify the directory containing your source code.
"remoteRoot": "${workspaceFolder}" // Linux example; adjust as necessary for your OS and situation.
}
]
}
和uwsgi配置:
[development]
virtualenv = %(chdir)/../env/env1/
http = 127.0.0.1:9090
然后在本地启用的venv中运行uwsgi:
uwsgi --ini conf.d/uwsgi/dev.ini
具有以下输出:
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on 0.0.0.0:3001 fd 4
uWSGI http bound on 127.0.0.1:9090 fd 5
uwsgi socket 0 bound to TCP address 127.0.0.1:42183 (port auto-assigned) fd 3
Python version: 3.7.2 (default, Jan 11 2019, 21:31:15) [GCC 5.4.0 20160609]
你能做到吗?