debugging a uwsgi python application using pycharm

后端 未结 3 758
眼角桃花
眼角桃花 2021-01-01 10:06

Is it possible to debug a uwsgi application using an ide like PyCharm? I can debug flask based apps fine by running them directly from pycharm but cannot even run a uwsgi ap

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-01 10:15

    There is now an official guide on how to do this: https://www.jetbrains.com/help/pycharm/remote-debugging-with-product.html#

    If your code already exists in remote, you only need to follow Create a run/debug configuration

    You'll need the IP where the PyCharm is running. When you run the remote debugger from PyCharm, it'll create a debugging server. Your code will connect to this server.

    In my case, I'm using Vagrant, with private IP of the guest 192.168.0.3, and the host's private IP is 192.168.0.1. My code in the remote guests will connect to the debugging server through the host IP. So I need to use my host IP in the code that I want to debug.

提交回复
热议问题