On Thu, Feb 10, 2011 at 3:21 AM, Sameer Rahmani <lxsam...@lxsameer.com> wrote:
> Hi,
>
> i was working in a project with a very complex logic, and i mixed up
> with logical problems in the code. i used some debugging methods and
> tools like ipdb, pdb.set_trace(), django-command-extension and etc. but
> at last i end up with a little django patch #15249.
>
> that patch provide a easy way to debug django code at the exception
> raise time. i discussed about the inline debugging idea in irc developer
> channel with some cool guys :D, and  i decided to post this mail to
> share the idea with others and get their ideas.
>
> what does #15249 patch do?
>
> it run a pdb or ipython shell when an exception raised with the
> namespaces of raised trackback, (if settigns.INLINE_DEBUGGER set to
> correct value), so it will be very easy to test some code.
>
> why don't you use:
>
> * pdb.set_trace()?
> because i have to write some code in each module that i want to debug
> and also i can't test some code snippet in the runtime env (as far as i
> know)
>
> * ipdb?
> same as pdb and its and external module and i cant expect my friend to
> install that too.
>
> * django-command-extension?
> it's an external tool too, its very cool but don't have some of ipython
> feature like code completer.
>
> #15249 patch is a little and lazy code, but it will be a good idea for
> django to provide such functionality.
>
> what's your idea about it ?

My biggest problem with this proposal is that it plants itself in the
main HTTP stack. That means it's in the code path when you deploy your
code into production.

I have no objection to the idea of making it easier to debug problems
when they occur, but it should be constrained to the development
server.

Better still, it should be something that can be implemented as an
entirely external tool, accessing a hook provided by the development
server. I don't know what that hook would look like exactly, but in
general, adding hooks is an easier sell than adding settings to
enable/disable functionality.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to