how to enable breakpoints inside flask scripts with pyzo ?

34 views
Skip to first unread message

Giovanni Triboli

unread,
Dec 17, 2020, 5:07:15 AM12/17/20
to Pyzo

Hi all.
I'm addicted to Pyzo. It's awesome.
The only thing I can't do is setting a breakpoint on a route function
and having Pyzo able to let me debug the function
when I open that route in the browser.
If you develop with the flask micro framework you know what I mean.

I'm able to debug flask scripts only until I execute the app.run() function.
From then on, breakpoints are useless.

I have tried both running the app with debug = True and False but it doesn't matter.

Maybe I lack some setting to let pyzo fully debug a flask script ?

Your suggestions are highly appreciated.
TIA
Giovanni Triboli

Almar Klein

unread,
Dec 21, 2020, 5:29:39 AM12/21/20
to Giovanni Triboli, Pyzo
Hi Giovanni,

It's indeed not possible to debug Flask applications with breakpoints. This is because Flask runs the webserver (and event loop) in a specific way. I've never dived in deep enough to know what the exact problem is, and whether it's something that possible to fix. But it's indeed a known limitation.

Personally, I've found flask applications are best run from the terminal. Then I use e.g. print statements to debug. Not ideal, but it usually gets the job done.

- Almar
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+uns...@googlegroups.com.

Giovanni Triboli

unread,
Dec 21, 2020, 11:16:55 AM12/21/20
to Pyzo
Hi Almar.
I understand that this is an advanced feature.
I'm able to set breakpoints when I develop my flask projects with the Wing Personal Edition IDE.
But that free edition has other limitations so I'd prefer using Pyzo.
Unfortunately you're saying that this isn't feasible in Pyzo.
Thank you for your message.
Giovanni

Almar Klein

unread,
Dec 22, 2020, 4:44:51 AM12/22/20
to Pyzo
To be a bit more precise, it's not supported right now, and I don't know at the moment how hard it is to make it work.

- Almar
Reply all
Reply to author
Forward
0 new messages