Debugging options w/ Python, Flask and Sublime Text 2


Question

I have just switched to Sublime Text 2 for my Python development. I usually do web programming with the Flask micro framework.

What are my debugging options with this combination, and how do I set it up? I'm working on Windows 7.

1
10
11/1/2012 9:48:52 AM

Use pdb:

import pdb; pdb.set_trace()

(or the even better pdb++)

Also, Flask already include Werkzeug which contains an interactive JavaScript based in-browser debugger, I highly recommend you utilize it.

(if your Flask uses uWSGI you can check out this guide to make Werkzeug debugger work: debugging flask application under uWSGI)

10
11/1/2012 10:01:42 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon