7

I developed a REST API on Flask and deployed on IIS following the below instruction https://medium.com/@bilalbayasut/deploying-python-web-app-flask-in-windows-server-iis-using-fastcgi-6c1873ae0ad8

Is there any way to debug a Flask app hosted on IIS via WFastCGI?

Currently it only shows {"message": "Internal Server Error"} if there is any error.(which is totally not helpful)

How could I retrieve an error log for this?

Please do not mark as duplicate, the provided link does not help. I used the WFastCGI and IIS thus I do not explicitly run 'flask run' thing

MTANG
  • 508
  • 5
  • 16
  • 1
    I have the same problem Did you find a solution – mete eroğlu Aug 27 '20 at 23:40
  • You can get the detailed HTTP errors in IIS by enabling detailed errors: https://www.layerstack.com/resources/tutorials/How-to-enable-detailed-error-reporting-from-IIS-on-Windows-Cloud-Servers . Otherwise, use the logger module in python. – moosearch Mar 23 '21 at 00:41
  • In case you want to debug it using `debugpy`, you can switch to HttpPlatformHandler for Python hosting on IIS and then modify `web.config` to inject `debugpy` via command line arguments. – Lex Li Jul 11 '22 at 06:58

0 Answers0