Breakpoints inside Flask-RESTful class methods aren't hit on PTVS Breakpoints inside Flask-RESTful class methods aren't hit on PTVS flask flask

Breakpoints inside Flask-RESTful class methods aren't hit on PTVS


I had the same exact problem (but with PyCharm on Mac).

I believe this has something to do with the way Flask reloads itself when debug=True. Setting debug to False allowed me to break inside the view methods.


Disabling Debug resolves the issue with the breakpoint hit, but has the disadvantage that you are unable to read exception trace output.

One way to bypass this limitation is to add:

DEBUG = FalsePROPAGATE_EXCEPTIONS = True

to your config.

When an exception occurs the browser still displays "Internal Server Error" message, but the console Window will receive the exception trace normally.