APIFairy icon indicating copy to clipboard operation
APIFairy copied to clipboard

Disabling interactive web based debugger from Werkzeug and print to terminal

Open pascal-mueller opened this issue 1 year ago • 1 comments

Hello,

if I understand it correctly, Flask uses Werkzeug and Werkzeug assumes we are in some MVC design pattern or something similar i.e. we are not a pure API. So they provide an interactive debugger and what not yet we can't really use that because with APIFairy, we make pure APIs.

This leads to things like seeing the interactive Werkzeug debugger resp. its HTML in the response in the documentation generated by APIFairy.

I figured, I probably can simply configure Flask or Werkzeug such that it dumps the information to the terminal but I just can't find any information as to how.

How exactly is this solved? How do I tell Flask or Werkzeug to simply print everything into the terminal/stdout?

pascal-mueller avatar Jul 28 '23 11:07 pascal-mueller

The Flask debugger is not enabled by default. You must have turned it one. Maybe by setting FLASK_DEBUG in the environment, or some other way. So you need to review your Flask app configuration and remove the debug setting.

miguelgrinberg avatar Jul 28 '23 11:07 miguelgrinberg