rpicard / explore-flask

Source of Explore Flask book
http://exploreflask.com
1.69k stars 199 forks source link

Move debugging chapter closer to beginning #16

Open rpicard opened 10 years ago

rpicard commented 10 years ago

From aezell on Hacker News:

I love this. I think it would be useful to move the debugging chapter much earlier in the book. Presumably, new users of Flask will encounter the (pretty awesome) Werkzeug error page as they move through the book. It might work well if a debugging chapter had exposed them to a little bit of how to interpret and use that tool. I'm sure there's a lot more about debugging to cover so maybe splitting things up makes sense too.

https://news.ycombinator.com/item?id=6834818

iurisilvio commented 10 years ago

I agree with this one. Several people I taught about it didn't know it was possible even after using Flask for some time.

Today, I prefer to explicitly raise an exception in my code to use werkzeug error page instead of use pdb (or other tools).

rpicard commented 10 years ago

It's a +1 from me as well. It makes a lot of sense to start the reader off right with debugging techniques for the rest of the book.

aezell commented 10 years ago

Thanks for creating this issue Robert. It's possible getting into deeper debug issues early in the book more generate more questions than progress. So, perhaps, a short chapter or just a section elucidating the Werkzeug error page is enough to keep folks from being frightened the first time they run into it. You could even work it in fairly deftly in an early section by intentionally introducing an error in a URL route or a missing config value. I haven't yet read version 0.1 but maybe something will jump out as soon as I do.

rpicard commented 10 years ago

@aezell That's a cool idea. Let me know if anything jumps out at you then.