Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 在VS代码中设置UWSGI调试_Python 3.x_Visual Studio Code_Uwsgi_Vscode Debugger - Fatal编程技术网

Python 3.x 在VS代码中设置UWSGI调试

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": [

我正在尝试用VS代码调试本地uwsgi。很遗憾,我无法将python解释器附加到我的可视化代码调试:

VSCode launch.json配置:

{
        "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]

你能做到吗?