On Dec 27 2008, 5:14 am, "Russell Keith-Magee"
<freakboy3...@gmail.com> wrote:
> On Sat, Dec 27, 2008 at 2:32 AM, Fridrik Mar Jonsson <fridr...@gmail.com> 
> wrote:
>
>
>
> > Hi Djangonians,
>
> > I recently had an instance where it would have been really convenient
> > to see the error and a traceback in the ``runserver`` console instead
> > of just a single line telling me that the request returned a 500
> > error.

I just noticed this too.  Sometime between 0.96.3 and 1.0  "./
manage.py runserver" stops printing out tracebacks. The "--traceback"
and "-v" options do nothing.

> > In the event of blind debugging, where a 3rd party tool is performing
> > a request that renders in an error, is there a Django mechanism or
> > extension that allows you to catch any exceptions that occur during a
> > page load and redirect them to the ``runserver`` console in addition
> > to displaying them in the template?
>
> There are two options I can think of on an unmodified Django install.
>
> Firstly, write a middleware that implements process_exception(). This
> middleware will get invoked whenever an exception is raised as part of
> the view; the middleware method will be the exception as one of the
> arguments.
>
> http://docs.djangoproject.com/en/dev/topics/http/middleware/#process-...
>
> Secondly, write a listener for the got_request_exception signal. This
> signal is fired whenever an exception other than 404, Permission
> Denied, or SystemExit is raised.
>
> http://docs.djangoproject.com/en/dev/ref/signals/#django.core.signals...
>
> > For an optimistic moment I thought ``--traceback`` was a bit
> > promising, but then it turned out that it doesn't really seem to do
> > what I expected in the case of ``runserver``.  I even considered
> > switching to e-mail tracebacks but ended up writing a client to mimic
> > the 3rd party tool's functionality instead.
>
> When I read this I went and had a look at the code, and it appears you
> are correct. ``--traceback`` exists as a top-level command option, but
> it doesn't appear to be exploited at all inrunserver. This actually
> surprised me - it seems like a reasonable suggestion for an
> improvement. Feel free to open this as a ticket (and if you're really
> adventurous, work on a patch :-)
>
> Yours,
> Russ Magee %-)

I can open a ticket, and even attempt a patch.  How did this go away?
I'm curious.

Regards,
~Simon
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to