On 5/2/2009 9:53 AM, Malcolm Tredinnick wrote: > On Sat, 2009-05-02 at 04:11 -0700, Kless wrote: >> How to debug a middleware? I would print any variables for a >> middleware that I'm building >> >> Is there any way to make it? > > In any sensible web server setup, printing to sys.stderr will send the > output the server's error log. With Django's development server (the > "runserver") command, it will send the output to the console that you > started the dev server from. So use > > print >> sys.stderr, "...." > > to your heart's content.
Or you can always use `pdb` if you're running the development server. -- George --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---