Django

Code

Ticket #3527 (closed: wontfix)

Opened 2 years ago

Last modified 1 year ago

better debug traceback with code executing...

Reported by: Jens Assigned to: nobody
Milestone: Component: Core framework
Version: SVN Keywords: debug, traceback
Cc: pythonmailing@web.de, armin.ronacher@active-4.com, jshaffer2112@gmail.com, django_trac@jensdiemer.de Triage Stage: Design decision needed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

The django debug traceback ist good. But the colubrids one is better: http://trac.pocoo.org/browser/colubrid/trunk/colubrid/debug.py

With this debug traceback you can execute python code via a small AJAX script. Everything is in the debug.py file from above.

Attachments

django_debugger.patch (17.0 kB) - added by Marek Kubica <pythonmailing@web.de> on 04/14/07 08:27:30.
Patch by Armin Ronacher to add a debugger to Django's exceptions
django_debugger_r5588.diff (13.9 kB) - added by John Shaffer <jshaffer2112@gmail.com> on 07/03/07 00:46:53.
Patch against [5588]
django_debugger_r5620.diff (13.4 kB) - added by John Shaffer <jshaffer2112@gmail.com> on 07/05/07 16:03:55.
Patch against [5620]. This one doesn't cause any visual changes.

Change History

(follow-up: ↓ 2 ) 02/19/07 14:07:04 changed by SmileyChris

  • needs_better_patch changed.
  • stage changed from Unreviewed to Design decision needed.
  • needs_tests changed.
  • needs_docs changed.

This isn't a very clearly defined ticket (and code executing sounds dodgy) but I'll leave for someone else to close.

(in reply to: ↑ 1 ) 02/20/07 00:10:47 changed by anonymous

Replying to SmileyChris:

(and code executing sounds dodgy)

I forgot. The code executing is naturally only for debugging ;) And this is very, very helpfully!

from the docs http://wsgiarea.pocoo.org/colubrid/documentation/server/#enable-evalexception-feature : """ The debugger features a system which lets you execute arbitrary code in exceptions' stack frames, like paste's evalexception. Because this is a potential security risk, you must activate it explicitly with an additional keyword argument: """ see also:

03/09/07 06:39:02 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to wontfix.

This looks outside the scope of Django. Building a Python debugger into the web browser looks cool, but dangerous. If somebody wanted to, it would be possible dynamically put this in as the traceback handler in their own Django code fairly easily, I suspect. Anybody who wanted to write up a wiki page on that would be welcome.

04/09/07 03:09:55 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

I do not understand, why is not for the purposes of django! It is a big help for debugging.

On the subject Dangerously: This debugger should only work with the built in development Web server. And here stands clear: "DO NOT USE THIS SERVER IN A PRODUCTION SETTING."

So, what it the problem?

04/09/07 03:59:04 changed by Simon G. <dev@simon.net.nz>

  • status changed from reopened to closed.
  • resolution set to wontfix.

Can you please raise this in the django-developers mailing list if you want to debate things. The mailing list is easier for people to beat around ideas/arguments like this.

Thanks, Simon

04/14/07 08:27:30 changed by Marek Kubica <pythonmailing@web.de>

  • attachment django_debugger.patch added.

Patch by Armin Ronacher to add a debugger to Django's exceptions

04/14/07 08:28:37 changed by Marek Kubica <pythonmailing@web.de>

  • cc set to pythonmailing@web.de.
  • has_patch set to 1.

04/14/07 08:38:08 changed by anonymous

  • cc changed from pythonmailing@web.de to pythonmailing@web.de, armin.ronacher@active-4.com.
  • status changed from closed to reopened.
  • resolution deleted.

(follow-up: ↓ 10 ) 05/08/07 09:49:07 changed by Armin Ronacher

Anything new regarding that patch?

(in reply to: ↑ 9 ) 05/08/07 19:53:38 changed by mtredinnick

Replying to Armin Ronacher:

Anything new regarding that patch?

Please don't post noise like that. It adds nothing to the ticket. If there was news, you would see it in the comments being updated. As far as I'm concerned, it's still wontfix for the reason given above.

05/09/07 15:16:21 changed by Armin Ronacher

It's just interesting to see that the discussion in the trac is at "wontfix" whereas people in the mailinglist seem to like the idea and there was no real show stopper.

07/03/07 00:46:53 changed by John Shaffer <jshaffer2112@gmail.com>

  • attachment django_debugger_r5588.diff added.

Patch against [5588]

07/03/07 00:48:23 changed by John Shaffer <jshaffer2112@gmail.com>

  • cc changed from pythonmailing@web.de, armin.ronacher@active-4.com to pythonmailing@web.de, armin.ronacher@active-4.com, jshaffer2112@gmail.com.

07/04/07 02:34:57 changed by Jens Diemer

  • cc changed from pythonmailing@web.de, armin.ronacher@active-4.com, jshaffer2112@gmail.com to pythonmailing@web.de, armin.ronacher@active-4.com, jshaffer2112@gmail.com, django_trac@jensdiemer.de.

07/05/07 16:03:55 changed by John Shaffer <jshaffer2112@gmail.com>

  • attachment django_debugger_r5620.diff added.

Patch against [5620]. This one doesn't cause any visual changes.

(follow-up: ↓ 16 ) 09/14/07 04:44:51 changed by Simon G. <dev@simon.net.nz>

  • status changed from reopened to closed.
  • resolution set to wontfix.

Wontfix. Again. I'm not sure that anyone is convinced that this is a good idea. Please raise this on django-developers to discuss.

09/14/07 04:46:16 changed by Simon G. <dev@simon.net.nz>

To have any chance of being implemented this will need to be a middleware or something pluggable, and not part of the core debug page. Please feel free to rewrite it as such.

(in reply to: ↑ 14 ) 09/14/07 04:53:32 changed by anonymous

Replying to Simon G. <dev@simon.net.nz>:

Wontfix. Again. I'm not sure that anyone is convinced that this is a good idea. Please raise this on django-developers to discuss.

There was a discuss here: http://groups.google.com/group/django-developers/browse_thread/thread/cca45aa7c9106b88

I think is would be a nice idea to make this as a middleware on the Sprint. So adding this idea on the SprintIdeas page???

09/14/07 05:04:45 changed by Michael Radziej <mir@noris.de>

The core developers are not interested in this, and the decision is final. If you can put it into a separate middleware, please put it into the django snippets site and anybody interested can use it from there. I personally lile it, but the security implications are too serious to make it part of the project.


Add/Change #3527 (better debug traceback with code executing...)




Change Properties
Action