настроить отладку UWSGI в коде VS - PullRequest
0 голосов
/ 10 апреля 2019

Я пытаюсь отладить локальный UWSGI с кодом VS.К сожалению, я не могу присоединить интерпретатор 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

ТогдаЯ запускаю uwsgi в своем локальном включенном venv:

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]
...