matabares
matabares

Reputation: 838

How to debug falcon app on windows and pycharm?

there is a way to debug a falcon app on windows? I'm using Pycharm.

I use waitress to run from the command line, but I have no idea how to debug my source code.

Upvotes: 0

Views: 1166

Answers (2)

Alessandro M.
Alessandro M.

Reputation: 123

Maybe I don't get the question. I use Pycharm to develop a falcon REST API on windows. No problems in debugging whatsoever. You just need to set a run configuration by setting the Script path to point to the file with the waitress.serve line and then launch it as Debug instead of Run.

In my case the file looks like this:

from api_falcon.app import api as application

if __name__ == '__main__':
    import os
    import waitress
    waitress.serve(application, host=os.getenv('MYAPI_WSGI_HOST', '0.0.0.0'), port=os.getenv('MYAPI_WSGI_PORT', '8080'))

Upvotes: 2

Dip Ghosh
Dip Ghosh

Reputation: 55

I have used pycharm 2018 and I have not found any support for debug falcon app(maybe I could be wrong ). What I have done is make a different file on same directory and put all function over there and debug that file as normal python script or. May be you can use print or kind of unit test to test your code.

Upvotes: 0

Related Questions