How to remotly debug python on my apache?

How can I debug WSGI Python web app?

  • I set up my Python & WSGI environment (Windows 7, Apache 2.2, Python 2.7, mod_wsgi + Aptana 3 Studio) and I am able to run simple web page using Python/WSGI, but I do not know how to debug it (except to look to apache_error.log file). Is there an easy way how to debug Pyhon/WSGI web app?

  • Answer:

    Edit: Now there’s https://github.com/Kozea/wdb, so use it instead. Use Werkzeug debugging middleware (http://werkzeug.pocoo.org/docs/debug/).  It provides web-based interactive shell when an exception has been raised.

Hong Minhee ・ 洪 民憙 at Quora Visit the source

Was this solution helpful to you?

Other answers

Depends on which layer you are debugging.  To debug the Python code, I really like the Wingware IDE.  It isn't free, but for only $300 or so you get a first-rate debugger.  If you can run it from the machine where the Python processes run it is extremely simple; with a little more work you can run it from one machine and debug code running on another machine.  Wonderful productivity booster.

Chris Johnson

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.